[PATCH] D123676: [clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline.

2022-05-17 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius reopened this revision. curdeius added a comment. This revision is now accepted and ready to land. Reverted for now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123676/new/ https://reviews.llvm.org/D123676

[clang] 573a5b5 - Revert "[clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline."

2022-05-17 Thread Marek Kurdej via cfe-commits
Author: Marek Kurdej Date: 2022-05-18T07:27:45+02:00 New Revision: 573a5b58001d6dd86d404832b7b1c45a1b4f4c55 URL: https://github.com/llvm/llvm-project/commit/573a5b58001d6dd86d404832b7b1c45a1b4f4c55 DIFF: https://github.com/llvm/llvm-project/commit/573a5b58001d6dd86d404832b7b1c45a1b4f4c55.diff

[PATCH] D125848: [clang-format] Handle attributes in enum declaration.

2022-05-17 Thread Tyler Chatow via Phabricator via cfe-commits
tchatow created this revision. Herald added a project: All. tchatow requested review of this revision. Herald added a project: clang. Fixes https://github.com/llvm/llvm-project/issues/55457 Ensures that attributes in the enum declaration are interpreted correctly, for instance: enum class

[PATCH] D124977: [NFC][Clang] Modify expect of fail test or XFAIL because CSKY align is different

2022-05-17 Thread Zixuan Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdca37af061fb: [NFC][Clang] Modify expect of fail test or XFAIL because CSKY align is different (authored by zixuan-wu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] dca37af - [NFC][Clang] Modify expect of fail test or XFAIL because CSKY align is different

2022-05-17 Thread Zi Xuan Wu via cfe-commits
Author: Zi Xuan Wu (Zeson) Date: 2022-05-18T10:53:30+08:00 New Revision: dca37af061fbe6590399dfb4e3fd3dda16d63144 URL: https://github.com/llvm/llvm-project/commit/dca37af061fbe6590399dfb4e3fd3dda16d63144 DIFF:

[PATCH] D125585: [HLSL][clang][Driver] Parse target profile early to update Driver::TargetTriple.

2022-05-17 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 430211. python3kgae added a comment. Use llvm::Optional. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125585/new/ https://reviews.llvm.org/D125585 Files: clang/lib/Driver/Driver.cpp

[PATCH] D125557: [APInt] Remove all uses of zextOrSelf, sextOrSelf and truncOrSelf

2022-05-17 Thread Chris Lattner via Phabricator via cfe-commits
lattner added inline comments. Comment at: llvm/lib/Analysis/ConstantFolding.cpp:2884 if (IntrinsicID == Intrinsic::smul_fix_sat) { - APInt Max = APInt::getSignedMaxValue(Width).sextOrSelf(ExtendedWidth); - APInt Min =

[PATCH] D124244: [analyzer] add StoreToImmutable and ModelConstQualifiedReturn checkers

2022-05-17 Thread Zurab Tsinadze via Phabricator via cfe-commits
zukatsinadze added a comment. In D124244#3493307 , @martong wrote: >> The patch adds two new checkers. > > I don't see any technical dependencies between the two, so, please split it > into two independent patches. StoreToImmutable does not depend on

[PATCH] D125840: [Analyzer] Removed extra space from NSErrorChecker debug message and updated relevant tests

2022-05-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Thanks! I'll commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125840/new/ https://reviews.llvm.org/D125840

[PATCH] D124244: [analyzer] add StoreToImmutable and ModelConstQualifiedReturn checkers

2022-05-17 Thread Zurab Tsinadze via Phabricator via cfe-commits
zukatsinadze added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:767-769 assert(isa(sreg) || isa(sreg) || - isa(sreg)); + isa(sreg) || + isa(sreg)); steakhal wrote: > Please

[PATCH] D124244: [analyzer] add StoreToImmutable and ModelConstQualifiedReturn checkers

2022-05-17 Thread Zurab Tsinadze via Phabricator via cfe-commits
zukatsinadze updated this revision to Diff 430204. zukatsinadze marked 14 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124244/new/ https://reviews.llvm.org/D124244 Files: clang/docs/analyzer/checkers.rst

[PATCH] D125585: [HLSL][clang][Driver] Parse target profile early to update Driver::TargetTriple.

2022-05-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Driver/ToolChains/HLSL.h:32 Action::OffloadKind DeviceOffloadKind) const override; - std::string ComputeEffectiveClangTriple(const llvm::opt::ArgList , - types::ID

[PATCH] D125840: [Analyzer] Removed extra space from NSErrorChecker debug message and updated relevant tests

2022-05-17 Thread Usama Hameed via Phabricator via cfe-commits
usama54321 created this revision. Herald added subscribers: manas, steakhal, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: All. usama54321 requested review of this revision. Herald added a

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-05-17 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D122895#3511855 , @aaron.ballman wrote: >> (It also seems unfortunate to regress the false positive rate of this >> diagnostic before `-fstrict-prototypes` is available.) > > `-fno-knr-functions` is available already

[PATCH] D113107: Support of expression granularity for _Float16.

2022-05-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Okay, well, first off, we definitely shouldn't be repeating conditions like `isX86()` all over the place. What you want to do is to have a general predicate which answers whether we should emit this operation with excess precision; imagine an architecture that wanted

[PATCH] D125839: [gmodules] Skip CXXDeductionGuideDecls when visiting FunctionDecls in DebugTypeVisitor

2022-05-17 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Without this fix, `CXXNameMangler::mangleUnresolvedName` crashes when it tries to mangle the name of a `CXXDeductionGuideDecl`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125839/new/ https://reviews.llvm.org/D125839

[clang-tools-extra] 79ca4ed - [pseudo] Design notes from discussion today. NFC

2022-05-17 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-05-18T00:08:47+02:00 New Revision: 79ca4ed3e782e505e8964a3c968de5fd4f09ca7a URL: https://github.com/llvm/llvm-project/commit/79ca4ed3e782e505e8964a3c968de5fd4f09ca7a DIFF: https://github.com/llvm/llvm-project/commit/79ca4ed3e782e505e8964a3c968de5fd4f09ca7a.diff

[PATCH] D125839: [gmodules] Skip CXXDeductionGuideDecls when visiting FunctionDecls in DebugTypeVisitor

2022-05-17 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: aprantl. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. rdar://92845517 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D125839 Files:

[PATCH] D125802: Fix std::has_unique_object_representations for _BitInt types with padding bits

2022-05-17 Thread Mital Ashok via Phabricator via cfe-commits
MitalAshok updated this revision to Diff 430186. MitalAshok edited the summary of this revision. MitalAshok added a comment. Added release note and missing test for struct with reference member Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D125829: [clang] Fix __has_builtin

2022-05-17 Thread Artem Belevich via Phabricator via cfe-commits
tra added a subscriber: echristo. tra added a comment. @echristo - FYI, in case you have an opinion on target builtin feature checks. Comment at: clang/include/clang/Basic/Builtins.h:263 + ///false if it is disabled. + bool isRequiredTargetFeaturesEnabled( +

[PATCH] D125821: [clang][dataflow] Fix double visitation of nested logical operators

2022-05-17 Thread Eric Li via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. li.zhe.hua marked an inline comment as done. Closed by commit rG5bbef2e3fff1: [clang][dataflow] Fix double visitation of nested logical operators (authored by li.zhe.hua). Repository: rG LLVM Github Monorepo CHANGES

[clang] 5bbef2e - [clang][dataflow] Fix double visitation of nested logical operators

2022-05-17 Thread Eric Li via cfe-commits
Author: Eric Li Date: 2022-05-17T20:28:48Z New Revision: 5bbef2e3fff123293ed9c2037e2662e352bf37af URL: https://github.com/llvm/llvm-project/commit/5bbef2e3fff123293ed9c2037e2662e352bf37af DIFF: https://github.com/llvm/llvm-project/commit/5bbef2e3fff123293ed9c2037e2662e352bf37af.diff LOG:

[PATCH] D125821: [clang][dataflow] Fix double visitation of nested logical operators

2022-05-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125821/new/ https://reviews.llvm.org/D125821

[PATCH] D125259: [C11] Diagnose unreachable generic selection associations

2022-05-17 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. > I'm questioning the benefit to supporting _Generic in C++ and starting to > wonder if perhaps we should pull this extension back. I imagine it may be used in shared system headers. E.g., implementations of `tgmath.h` that don't use the builtins. Repository:

[PATCH] D115232: [clangd] Indexing of standard library

2022-05-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a subscriber: thakis. sammccall added a comment. Hmm, the test keeps crashing on the GN bot: http://45.33.8.238/win/58316/step_9.txt Unfortunately the stacktrace is not symbolized, and I'm not seeing this elsewhere (e.g. premerge bot). @thakis, any idea why unittests no longer

[PATCH] D125814: Fix strict prototype diagnostic wording for definitions

2022-05-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D125814#3520137 , @jyknight wrote: > This confuses me. > > Looking at behavior with default flags: > > We won't emit a -Wdeprecated-non-prototype warning for `int foo();`, until we > subsequently find `int foo(int arg)

[clang-tools-extra] 6aabf60 - Revert "Reland "[clangd] Indexing of standard library""

2022-05-17 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-05-17T21:33:48+02:00 New Revision: 6aabf60f2fb7589430c0ecc8fe95913c973fa248 URL: https://github.com/llvm/llvm-project/commit/6aabf60f2fb7589430c0ecc8fe95913c973fa248 DIFF: https://github.com/llvm/llvm-project/commit/6aabf60f2fb7589430c0ecc8fe95913c973fa248.diff

[PATCH] D125557: [APInt] Remove all uses of zextOrSelf, sextOrSelf and truncOrSelf

2022-05-17 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: llvm/lib/IR/ConstantRange.cpp:724 auto BW = getBitWidth(); -APInt Min = APInt::getMinValue(BW).zextOrSelf(ResultBitWidth); -APInt Max = APInt::getMaxValue(BW).zextOrSelf(ResultBitWidth); +APInt Min =

[PATCH] D123649: Allow flexible array initialization in C++.

2022-05-17 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4639 + getDataLayout().getTypeAllocSize(Init->getType())); + assert(VarSize == CstSize && "Emitted constant has unexpected size"); +#endif ahatanak wrote: > This

[PATCH] D91157: [AArch64] Out-of-line atomics (-moutline-atomics) implementation.

2022-05-17 Thread Pavel Iliin via Phabricator via cfe-commits
ilinpv added a comment. I think it looks reasonable to define 5th memory model, add barriers __sync_* builtins and to outline-atomics calls as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91157/new/ https://reviews.llvm.org/D91157

[PATCH] D125555: [clang] Add __has_target_feature

2022-05-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/docs/LanguageExtensions.rst:275 + // On amdgcn target + #if __has_target_feature("s-memtime-inst") +x = __builtin_amdgcn_s_memtime(); yaxunl wrote: > yaxunl wrote: > >

[PATCH] D125829: [clang] Fix __has_builtin

2022-05-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, aaron.ballman, rsmith. Herald added a project: All. yaxunl requested review of this revision. Fix `__has_builtin` to return 1 only if the requested target features of a builtin are enabled by refactoring the code for checking required

[PATCH] D125821: [clang][dataflow] Fix double visitation of nested logical operators

2022-05-17 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua marked an inline comment as done. li.zhe.hua added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:574 -// Sub-expressions that are logic operators are not added in basic blocks -// (e.g. see CFG for `bool d = a && (b || c);`). If

[PATCH] D125821: [clang][dataflow] Fix double visitation of nested logical operators

2022-05-17 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua updated this revision to Diff 430152. li.zhe.hua added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125821/new/ https://reviews.llvm.org/D125821 Files: clang/lib/Analysis/FlowSensitive/Transfer.cpp

[clang-tools-extra] ccdb56a - Reland "[clangd] Indexing of standard library"

2022-05-17 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-05-17T21:02:23+02:00 New Revision: ccdb56ac10eef3048135169a67d239328c2b1de6 URL: https://github.com/llvm/llvm-project/commit/ccdb56ac10eef3048135169a67d239328c2b1de6 DIFF: https://github.com/llvm/llvm-project/commit/ccdb56ac10eef3048135169a67d239328c2b1de6.diff

[PATCH] D125823: [clang][dataflow] Weaken guard to only check for storage location

2022-05-17 Thread Eric Li via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG854c273cbb7e: [clang][dataflow] Weaken guard to only check for storage location (authored by li.zhe.hua). Repository: rG LLVM Github Monorepo

[clang] 854c273 - [clang][dataflow] Weaken guard to only check for storage location

2022-05-17 Thread Eric Li via cfe-commits
Author: Eric Li Date: 2022-05-17T18:58:07Z New Revision: 854c273cbb7ec6745dc63cfe1951b51e9092e8ee URL: https://github.com/llvm/llvm-project/commit/854c273cbb7ec6745dc63cfe1951b51e9092e8ee DIFF: https://github.com/llvm/llvm-project/commit/854c273cbb7ec6745dc63cfe1951b51e9092e8ee.diff LOG:

[PATCH] D125506: [PowerPC] Implement XL compat __fnabs and __fnabss builtins.

2022-05-17 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision. lei added a comment. This revision is now accepted and ready to land. LGTM with minor updates before commit. Comment at: clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-fnabs.c:25 +// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-unknown-aix

[PATCH] D125821: [clang][dataflow] Fix double visitation of nested logical operators

2022-05-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:574 -// Sub-expressions that are logic operators are not added in basic blocks -// (e.g. see CFG for `bool d = a && (b || c);`). If `SubExpr` is a logic -// operator, it isn't

[PATCH] D125823: [clang][dataflow] Weaken guard to only check for storage location

2022-05-17 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua created this revision. li.zhe.hua added a reviewer: ymandel. Herald added subscribers: tschuett, steakhal. Herald added a project: All. li.zhe.hua requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Weaken the guard for whether a

[PATCH] D123649: Allow flexible array initialization in C++.

2022-05-17 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4639 + getDataLayout().getTypeAllocSize(Init->getType())); + assert(VarSize == CstSize && "Emitted constant has unexpected size"); +#endif This assertion fails when the

[PATCH] D125821: [clang][dataflow] Fix double visitation of nested logical operators

2022-05-17 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua created this revision. li.zhe.hua added a reviewer: ymandel. Herald added subscribers: tschuett, steakhal. Herald added a project: All. li.zhe.hua requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Sub-expressions that are logical

[PATCH] D125312: [pseudo] benchmark cleanups. NFC

2022-05-17 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe8e00e342c4f: [pseudo] benchmark cleanups. NFC (authored by sammccall). Changed prior to commit: https://reviews.llvm.org/D125312?vs=428357=430135#toc Repository: rG LLVM Github Monorepo CHANGES

[clang-tools-extra] e8e00e3 - [pseudo] benchmark cleanups. NFC

2022-05-17 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-05-17T20:22:42+02:00 New Revision: e8e00e342c4fadc8355d1dfb8de86fb0a3dcd5f7 URL: https://github.com/llvm/llvm-project/commit/e8e00e342c4fadc8355d1dfb8de86fb0a3dcd5f7 DIFF: https://github.com/llvm/llvm-project/commit/e8e00e342c4fadc8355d1dfb8de86fb0a3dcd5f7.diff

[clang-tools-extra] 127a149 - [clangd] Add command-line flag to set background indexing thread priority.

2022-05-17 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-05-17T20:17:07+02:00 New Revision: 127a1492d72902e2b2cd8905c1198743761f52fb URL: https://github.com/llvm/llvm-project/commit/127a1492d72902e2b2cd8905c1198743761f52fb DIFF: https://github.com/llvm/llvm-project/commit/127a1492d72902e2b2cd8905c1198743761f52fb.diff

[PATCH] D125673: [clangd] Add command-line flag to set background indexing thread priority.

2022-05-17 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG127a1492d729: [clangd] Add command-line flag to set background indexing thread priority. (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-05-17 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. My concerns have been addressed. I'll defer the final LGTM to @Anastasia. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124382/new/ https://reviews.llvm.org/D124382 ___ cfe-commits

[PATCH] D125814: Fix strict prototype diagnostic wording for definitions

2022-05-17 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. This confuses me. Looking at behavior with default flags: We won't emit a -Wdeprecated-non-prototype warning for `int foo();`, until we subsequently find `int foo(int arg) { return 5; }`. Since we definitely have the context of what's going on at that point, in order

[PATCH] D115232: [clangd] Indexing of standard library

2022-05-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 430130. sammccall added a comment. fix HasSubstr matcher type issue Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115232/new/ https://reviews.llvm.org/D115232 Files:

[PATCH] D125259: [C11] Diagnose unreachable generic selection associations

2022-05-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: rsmith. aaron.ballman added a comment. In D125259#3519947 , @aaron.ballman wrote: > Oh wow, good catch! I'll correct this. Oof, the plot thickens... the diagnostic is correct for some types, but is incorrect for

[PATCH] D125026: [clang-tidy][NFC] Reimplement SimplifyBooleanExpr with RecursiveASTVisitors

2022-05-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D125026#3519831 , @LegalizeAdulthood wrote: > Just for my own edification, how did you know/suspect that a pure visitor > would be faster than matchers? Mainly cause the fact we are creating 2 matcher expressions that

[PATCH] D113107: Support of expression granularity for _Float16.

2022-05-17 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. Finally got around to work on this. @rjmccall, @andrew.w.kaylor at your convenience please let me know your thoughts. There are a couple of things I'm still not sure about! Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113107/new/

[PATCH] D113107: Support of expression granularity for _Float16.

2022-05-17 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 430115. zahiraam marked an inline comment as done. Herald added subscribers: llvm-commits, hiraditya. Herald added projects: LLVM, All. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113107/new/ https://reviews.llvm.org/D113107 Files:

[PATCH] D125259: [C11] Diagnose unreachable generic selection associations

2022-05-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D125259#3519822 , @aeubanks wrote: > $ cat /tmp/a.cc > typedef struct Test { > } Test; > > void f() { > const Test constVal; > _Generic(constVal, const Test : 0); > } > $ ./build/rel/bin/clang

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-05-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122895#3512314 , @aaron.ballman wrote: > In D122895#3511682 , @aaron.ballman > wrote: > >> In D122895#3511632 , @jyknight >> wrote:

[PATCH] D125814: Fix strict prototype diagnostic wording for definitions

2022-05-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: jyknight, dexonsmith. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. Post-commit feedback on https://reviews.llvm.org/D122895 pointed out that the diagnostic wording

[PATCH] D125749: [analyzer][NFC] Introduce SVal::isa

2022-05-17 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp:44 // Uninitialized value used for the mutex? - if (V.getAs()) { + if (V.isa()) { if (ExplodedNode *N = C.generateErrorNode()) { xazax.hun wrote: > Is

[PATCH] D125788: [flang][driver] Rename `flang-new` as `flang`

2022-05-17 Thread H. Vetinari via Phabricator via cfe-commits
h-vetinari added a comment. Very happy to see this finally happening! :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125788/new/ https://reviews.llvm.org/D125788 ___ cfe-commits mailing list

[PATCH] D125709: [analyzer][Casting] Support isa, cast, dyn_cast of SVals

2022-05-17 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. While not having tests might be OK, but I'd prefer to introduce at least a couple uses of the new facilities so existing tests cover them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125709/new/

[PATCH] D125026: [clang-tidy][NFC] Reimplement SimplifyBooleanExpr with RecursiveASTVisitors

2022-05-17 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. Just for my own edification, how did you know/suspect that a pure visitor would be faster than matchers? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125026/new/ https://reviews.llvm.org/D125026

[PATCH] D125749: [analyzer][NFC] Introduce SVal::isa

2022-05-17 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp:44 // Uninitialized value used for the mutex? - if (V.getAs()) { + if (V.isa()) { if (ExplodedNode *N = C.generateErrorNode()) { Is there a difference

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-17 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/performance-unused-no-side-effect.rst:172-173 +List of functions that are considered not to read some of their arguments +unless their return value is read. Arguments are identified by

[PATCH] D125259: [C11] Diagnose unreachable generic selection associations

2022-05-17 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. $ cat /tmp/a.cc typedef struct Test { } Test; void f() { const Test constVal; _Generic(constVal, const Test : 0); } $ ./build/rel/bin/clang -fsyntax-only -x c++ /tmp/a.cc -Wall /tmp/a.cc:6:28: warning: due to lvalue conversion of the controlling

[PATCH] D125770: [clang-tidy] modernize-deprecated-headers should ignore system headers

2022-05-17 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-deprecated-headers-extern-c.cpp:37 -#include // FIXME: We should have no warning into system headers. -// CHECK-MESSAGES-WARN-INTO-HEADERS: mysystemlib.h:1:10: warning:

[PATCH] D125769: [clang-tidy] Introduce the WarnIntoHeaders option to modernize-deprecated-headers

2022-05-17 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.h:63 std::vector IncludesToBeProcessed; + bool WarnIntoHeaders; }; 1) How is this different from the clang-tidy option that specifies whether

[PATCH] D125802: Fix std::has_unique_object_representations for _BitInt types with padding bits

2022-05-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. This likely also needs a Release Note. Comment at: clang/lib/AST/ASTContext.cpp:2697 int64_t FieldSizeInBits = Context.toBits(Context.getTypeSizeInChars(Field->getType())); if (Field->isBitField()) { MitalAshok wrote: >

[PATCH] D125802: Fix std::has_unique_object_representations for _BitInt types with padding bits

2022-05-17 Thread Mital Ashok via Phabricator via cfe-commits
MitalAshok added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:2697 int64_t FieldSizeInBits = Context.toBits(Context.getTypeSizeInChars(Field->getType())); if (Field->isBitField()) { erichkeane wrote: > This answer ends up being wrong in

[PATCH] D125513: [clang-cl] Add /Zc:wchar_t- option

2022-05-17 Thread Pengxuan Zheng via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG366e57de23ed: [clang-cl] Add /Zc:wchar_t- option (authored by pzheng). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 366e57d - [clang-cl] Add /Zc:wchar_t- option

2022-05-17 Thread Pengxuan Zheng via cfe-commits
Author: Pengxuan Zheng Date: 2022-05-17T09:40:30-07:00 New Revision: 366e57de23ed20ac95201e1623dfffed215e98f8 URL: https://github.com/llvm/llvm-project/commit/366e57de23ed20ac95201e1623dfffed215e98f8 DIFF:

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-17 Thread Luca Versari via Phabricator via cfe-commits
veluca93 marked an inline comment as done. veluca93 added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/performance-unused-no-side-effect.rst:172-173 +List of functions that are considered not to read some of their arguments +unless their return value is

[PATCH] D125513: [clang-cl] Add /Zc:wchar_t- option

2022-05-17 Thread Pengxuan Zheng via Phabricator via cfe-commits
pzheng marked an inline comment as done. pzheng added a comment. In D125513#3519200 , @thakis wrote: > Looks good to me after addressing Hans's comment. > > Do you have commit access? Thanks for asking, @thakis. I do have comment access. Repository:

[PATCH] D125209: [clang-tidy] modernize-deprecated-headers check should respect extern "C" blocks

2022-05-17 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp:90 + // to the `ASTContext`. + Finder->addMatcher(ast_matchers::translationUnitDecl().bind("TU"), this); +} In modernize-macro-to-enum I had

[PATCH] D125513: [clang-cl] Add /Zc:wchar_t- option

2022-05-17 Thread Pengxuan Zheng via Phabricator via cfe-commits
pzheng marked an inline comment as done. pzheng added inline comments. Comment at: clang/test/Driver/cl-zc.cpp:50 // RUN: %clang_cl /c -### /Zc:wchar_t- -- %s 2>&1 | FileCheck -check-prefix=WCHAR_T-OFF %s -// WCHAR_T-OFF: argument unused during compilation +// WCHAR_T-OFF:

[PATCH] D125513: [clang-cl] Add /Zc:wchar_t- option

2022-05-17 Thread Pengxuan Zheng via Phabricator via cfe-commits
pzheng updated this revision to Diff 430096. pzheng marked an inline comment as done. pzheng added a comment. Address @hans's comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125513/new/ https://reviews.llvm.org/D125513 Files:

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-17 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/performance-unused-no-side-effect.rst:172-173 +List of functions that are considered not to read some of their arguments +unless their return value is read. Arguments are identified by

[PATCH] D125802: Fix std::has_unique_object_representations for _BitInt types with padding bits

2022-05-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I think I agree with the justification here, though am a touch confused in the test. I'm also a touch concerned that we have getSubobjectSizeInBits returning a 'rounded up to power of 2' bit happening here. The bitfield case returns non-powers-of-two, but the

[PATCH] D125802: Fix std::has_unique_object_representations for _BitInt types with padding bits

2022-05-17 Thread Mital Ashok via Phabricator via cfe-commits
MitalAshok created this revision. Herald added a project: All. MitalAshok retitled this revision from "Fix std::has_unique_object_representations for _BitInt types with padding" to "Fix std::has_unique_object_representations for _BitInt types with padding bits". MitalAshok edited the summary of

[PATCH] D123534: [dwarf] Emit a DIGlobalVariable for constant strings.

2022-05-17 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added a comment. Why, on Fuchsia, on WIndows, the DIs are in the order `q -> p -> r` is beyond me (instead of the file order and my order `p -> q -> r`. Looking into it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123534/new/

[PATCH] D125705: [OpenMP] Don't build the offloading driver without a source input

2022-05-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D125705#3519605 , @jhuber6 wrote: > In D125705#3519570 , @yaxunl wrote: > >> HIP toolchain allows clang driver to compile bundled bitcode or assembly for >> mixed host/device

[PATCH] D125749: [analyzer][NFC] Introduce SVal::isa

2022-05-17 Thread Aman LaChapelle via Phabricator via cfe-commits
bzcheeseman added a comment. Not a qualified reviewer for anything other than the `llvm::isa` usage and that line looks good to me! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125749/new/ https://reviews.llvm.org/D125749

[PATCH] D125771: [clang-tidy] Add a useful note about -std=c++11-or-later

2022-05-17 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. I thought there wasn't any support for validating fixits applied to header files? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125771/new/ https://reviews.llvm.org/D125771

[PATCH] D125705: [OpenMP] Don't build the offloading driver without a source input

2022-05-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D125705#3519570 , @yaxunl wrote: > HIP toolchain allows clang driver to compile bundled bitcode or assembly for > mixed host/device compilation or device-only multi-GPU compilation. > > e.g. > > clang --offload-arch=gfx906

[PATCH] D123773: [clang][analyzer][ctu] Make CTU a two phase analysis

2022-05-17 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/docs/ReleaseNotes.rst:352 + reports are lost compared to single-TU analysis, the lost reports are highly + likely to be false positives. I wonder if you also want to mention that this still finds most of the

[PATCH] D123773: [clang][analyzer][ctu] Make CTU a two phase analysis

2022-05-17 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp:446 +} +const bool BState = State->contains(D); +if (!BState) { // This is the first time we see this foreign function.

[PATCH] D125789: FIX the assembly format of the x86 backend to make both clang and gcc happy

2022-05-17 Thread Changwei Zou via Phabricator via cfe-commits
sheisc added a comment. In D125789#3519538 , @craig.topper wrote: > Is it gcc that needs a fix or binutils? Yes. Exactly speaking, it is the GNU assembler in binutils. https://www.gnu.org/software/binutils/ Repository: rG LLVM Github Monorepo

[PATCH] D125705: [OpenMP] Don't build the offloading driver without a source input

2022-05-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. HIP toolchain allows clang driver to compile bundled bitcode or assembly for mixed host/device compilation or device-only multi-GPU compilation. e.g. clang --offload-arch=gfx906 --offload-arch=gfx908 a.bc b.s Can you add a test to make sure this does not break HIP

[PATCH] D125789: FIX the assembly format of the x86 backend to make both clang and gcc happy

2022-05-17 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Is it gcc that needs a fix or binutils? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125789/new/ https://reviews.llvm.org/D125789 ___ cfe-commits mailing list

[PATCH] D125557: [APInt] Remove all uses of zextOrSelf, sextOrSelf and truncOrSelf

2022-05-17 Thread Philip Reames via Phabricator via cfe-commits
reames added a comment. Coming into this late, but I'd have preferred to see this separated into at least two pieces. One for each "non-obvious" adjustment, and one final one which just did the replace on the renaming sites. This differs from feedback from other reviewers above, so don't

[PATCH] D125789: FIX the assembly format of the x86 backend to make both clang and gcc happy

2022-05-17 Thread Changwei Zou via Phabricator via cfe-commits
sheisc added a comment. In D125789#3519493 , @pengfei wrote: > In D125789#3519433 , @sheisc wrote: > >> In D125789#3519411 , @pengfei >> wrote: >> >>> I think another

[PATCH] D125789: FIX the assembly format of the x86 backend to make both clang and gcc happy

2022-05-17 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D125789#3519433 , @sheisc wrote: > In D125789#3519411 , @pengfei wrote: > >> I think another way is to report the issue to GCC. From the perspective of >> the user, GCC should support

[PATCH] D125728: [WebAssembly] Update supported features in -mcpu=generic

2022-05-17 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. Oh, and per recent updates to the LLVM Developer policy I think it would be worth updating the Clang ReleaseNotes.rst to mention this change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D125728: [WebAssembly] Update supported features in -mcpu=generic

2022-05-17 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. Based on the discussion we had, I think this makes sense. It's a bit repetitive, but could you please add a test to clang/test/Driver that checks the list of enabled features for generic (and for completeness, probably bleeding-edge as well). Thanks. Repository: rG

[PATCH] D125789: FIX the assembly format of the x86 backend to make both clang and gcc happy

2022-05-17 Thread Changwei Zou via Phabricator via cfe-commits
sheisc added a comment. In D125789#3519411 , @pengfei wrote: > I think another way is to report the issue to GCC. From the perspective of > the user, GCC should support both `{%k1} {z}` and `{%k1}{z}`. Then we don't > need the clange on LLVM. Yes. It

[PATCH] D121733: Clean pathnames in FileManager.

2022-05-17 Thread Paul Pluzhnikov via Phabricator via cfe-commits
ppluzhnikov added inline comments. Comment at: clang-tools-extra/clangd/index/CanonicalIncludes.cpp:546 + {"include/wordexp.h", ""}, + {"include/x86intrin.h", ""}, + {"include/xlocale.h", ""}, ilya-biryukov wrote: > ppluzhnikov wrote:

[PATCH] D125789: FIX the assembly format of the x86 backend to make both clang and gcc happy

2022-05-17 Thread Changwei Zou via Phabricator via cfe-commits
sheisc abandoned this revision. sheisc added a comment. In D125789#3519361 , @pengfei wrote: > I guess a lot of lines of tests need to update > > $ grep -rn " {z}" llvm/test/CodeGen/X86/ | wc -l > 7797 Thanks. Yes. It seems to be a big revision,

[PATCH] D125789: FIX the assembly format of the x86 backend to make both clang and gcc happy

2022-05-17 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. I think another way is to report the issue to GCC. From the perspective of the user, GCC should support both `{%k1} {z}` and `{%k1}{z}`. Then we don't need the clange on LLVM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D125788: [flang][driver] Rename `flang-new` as `flang`

2022-05-17 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added a comment. Sounds good to me. https://reviews.llvm.org/D125796 for the bot side, let me know if/when the first half of the change goes in. I'll leave it to others to approve the change overall. I do think being able to do `./bin/flang` and get the right flang will save a

[clang-tools-extra] 76ddbb1 - Revert "[clangd] Indexing of standard library"

2022-05-17 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-05-17T17:17:27+02:00 New Revision: 76ddbb1ca747366417be64fdf79218df099a5973 URL: https://github.com/llvm/llvm-project/commit/76ddbb1ca747366417be64fdf79218df099a5973 DIFF: https://github.com/llvm/llvm-project/commit/76ddbb1ca747366417be64fdf79218df099a5973.diff

[PATCH] D125789: FIX the assembly format of the x86 backend to make both clang and gcc happy

2022-05-17 Thread Changwei Zou via Phabricator via cfe-commits
sheisc updated this revision to Diff 430067. sheisc retitled this revision from "Fix release note typo from 6da3d66f" to "FIX the assembly format of the x86 backend to make both clang and gcc happy". sheisc edited the summary of this revision. sheisc added a project: libc-project. Repository:

[PATCH] D125771: [clang-tidy] Add a useful note about -std=c++11-or-later

2022-05-17 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 430069. steakhal marked an inline comment as done. steakhal added a comment. fix typo `withing` -> `within` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125771/new/ https://reviews.llvm.org/D125771 Files:

  1   2   >