[PATCH] D120140: [clang-format] Avoid inserting space after C++ casts.

2022-02-18 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius marked an inline comment as done. curdeius added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1951 +// FIXME: Maybe we should handle identifiers ending with "_cast", +// e.g. bit_cast? +return true;

[PATCH] D119816: Fix not working attribute no_sanitize bounds that affects linux kernel

2022-02-18 Thread Tong Zhang via Phabricator via cfe-commits
ztong0001 added a comment. Thank you all! I have modified the summary, this patch focus on fixing non-working `__attribute__((no_sanitize("bounds"))) ` attribute. I will try to fix kernel `ksize()` related issue and `-fno-sanitize-undefined-trap-on-error` on separate patches. Repository: rG

[PATCH] D120159: [Clang] Implement __builtin_source_location.

2022-02-18 Thread James Y Knight via Phabricator via cfe-commits
jyknight created this revision. jyknight added reviewers: aaron.ballman, rsmith. Herald added subscribers: dexonsmith, arphaman, martong. Herald added a reviewer: shafik. jyknight requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This builtin

[PATCH] D120160: [Clang] Add `-funstable` flag to enable unstable and experimental features

2022-02-18 Thread Egor Zhdan via Phabricator via cfe-commits
egorzhdan created this revision. Herald added subscribers: dexonsmith, dang. egorzhdan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This new flag enables `__has_feature(cxx_unstable)` that would replace libc++ macros for individual unst

[PATCH] D119829: [Driver] Support Solaris/amd64 GetTls

2022-02-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. Comment at: clang/test/Driver/solaris-ld-sanitizer.c:6 +/// Check sparc-sun-solaris2.11, 32bit +// RUN: %clang %s -### 2>&1 \ +// RUN: --target=sparc-sun-solaris2.11 \ The first line is now shorte

[PATCH] D120149: [clang][dataflow] Add support for global storage values

2022-02-18 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev updated this revision to Diff 410014. sgatev marked 3 inline comments as done. sgatev added a comment. Address reviewers' comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120149/new/ https://reviews.llvm.org/D120149 Files: clang/li

[PATCH] D120149: [clang][dataflow] Add support for global storage values

2022-02-18 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev marked an inline comment as done. sgatev added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:80 + +/// Initializes global storage values in sub-expressions of `S`. +static void initGlobalVars(const Stmt &S, Environment &Env) { --

[PATCH] D120134: [analyzer] refactor makeIntValWithPtrWidth, remove getZeroWithPtrWidth (NFC)

2022-02-18 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:335 - NonLoc makeIntValWithPtrWidth(uint64_t integer, bool isUnsigned) { -return nonloc::ConcreteInt( -BasicVals.getIntWithPtrWidth(integer, isUnsigned)

[PATCH] D120149: [clang][dataflow] Add support for global storage values

2022-02-18 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Shouldn't there be a functionality to invalidate all the globals at every function call by default? Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:141 +// Global vars are already initialized in `Environment`. +if (D.hasGlobalStorag

[PATCH] D118987: [analyzer] Add failing test case demonstrating buggy taint propagation

2022-02-18 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D118987#3319697 , @steakhal wrote: > It seems like the `clang-ve-ninja` doesn't really want to accept any patches > from me :D > I hope it's not personal. Let's be friends bot, please. > > Link to the breakage: https://lab.llvm

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-02-18 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added a comment. In D119788#3331324 , @keith wrote: > Thanks for the tips! I left the default as generic here, but I totally take > your point on defaulting to the newest and I'm happy to update if you feel > strongly, lmk what you think I agree wit

[PATCH] D119537: [clangd] Treat 'auto' params as deduced if there's a single instantiation.

2022-02-18 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/AST.cpp:545 + // TemplateTypeParmTypes for implicit TTPs, instead of AutoTypes. + // Also we don't look very hard, just stripping const, references, pointers. + static TemplateTypeParmTypeLoc findContainedAutoT

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-02-18 Thread Keith Smiley via Phabricator via cfe-commits
keith updated this revision to Diff 410040. keith marked 2 inline comments as done. keith added a comment. Code review improvements Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119788/new/ https://reviews.llvm.org/D119788 Files: clang/lib/Drive

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-02-18 Thread Keith Smiley via Phabricator via cfe-commits
keith added inline comments. Comment at: llvm/lib/Support/Host.cpp:1326 + case CPUFAMILY_ARM_CYCLONE: +return "apple-a7"; + case CPUFAMILY_ARM_TYPHOON: jrtc27 wrote: > ARM only calls it cyclone, AArch64 allows both but apple-a7 is the canonical > name (the

[PATCH] D120149: [clang][dataflow] Add support for global storage values

2022-02-18 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev marked 2 inline comments as done. sgatev added a comment. I think we should provide such functionality and it probably should also apply to some of the pointer and reference values. Not sure what the default should be, but having the ability to choose the level of soundness for certain a

[PATCH] D120149: [clang][dataflow] Add support for global storage values

2022-02-18 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev updated this revision to Diff 410041. sgatev marked an inline comment as done. sgatev added a comment. Address reviewers' comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120149/new/ https://reviews.llvm.org/D120149 Files: clang/li

[PATCH] D119409: [C++20] [Modules] Remain dynamic initializing internal-linkage variables in module interface unit

2022-02-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D119409#3332476 , @urnathan wrote: > In D119409#3332313 , @dblaikie > wrote: > >> > > That's interesting data. I guess one could emit the out-of-line bodies into > their own sectio

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2022-02-18 Thread Keith Smiley via Phabricator via cfe-commits
keith added a comment. In D102669#3325467 , @steakhal wrote: > Hi @keith, I've seen you commented on a clang driver-related issue: "Why does > march=native not work on Apple M1?" >

[PATCH] D119271: CGCall: also emit LLVM `allocalign` attribute when handling AllocAlign

2022-02-18 Thread Augie Fackler via Phabricator via cfe-commits
durin42 updated this revision to Diff 410058. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119271/new/ https://reviews.llvm.org/D119271 Files: clang/lib/CodeGen/CGCall.cpp clang/test/CodeGen/alloc-align-attr.c clang/test/CodeGen/alloc-fns-ali

<    1   2