[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-09-30 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Thanks for working on this! How hard would it be to support: using size_t = __SIZE_TYPE__; template struct Id { typedef T type; }; int main() { struct S {} s; Id::type f = s; // just 'unsigned long', 'size_t' sugar has been lost } Repository: rG

[PATCH] D110614: [clang-tidy] Fix false positives in cppcoreguidelines-virtual-class-destructor

2021-09-30 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp marked 5 inline comments as done. carlosgalvezp added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-virtual-class-destructor.cpp:208 +// Forward declarations +// CHECK-MESSAGES-NOT: :[[@LINE+1]]:8: warning: destructor of

[PATCH] D110614: [clang-tidy] Fix false positives in cppcoreguidelines-virtual-class-destructor

2021-09-30 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 376116. carlosgalvezp added a comment. Added additional required tests. I might take some more time to fix the matcher since I need to get acquainted with AST, clang-query, etc, etc CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110614/new/ h

[PATCH] D110801: [clang-format] [docs] [NFC] improve clarity in the QualifierAlignment warning

2021-09-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: HazardyKnusperkeks, simon.giesecke. MyDeveloperDay added projects: clang, clang-format. MyDeveloperDay requested review of this revision. Improve the clarity and guidance of the warning when using code modifying option in clang

[PATCH] D69764: [clang-format] Add Left/Right Const fixer capability

2021-09-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. I'm not a wordsmith but how about D110801: [clang-format] [docs] [NFC] improve clarity in the QualifierAlignment warning Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D110614: [clang-tidy] Fix false positives in cppcoreguidelines-virtual-class-destructor

2021-09-30 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. By the way, there is a compiler warning that is identical to this check. Wouldn't it make sense to just make both checks identical? Otherwise there's risk that they conflict one another: https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaDeclCXX.cpp

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-09-30 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal added a comment. I modified the declare_mapper_target to print the contents of array after target region and found the following output: 2 3 4 5 6 7 8 9 10 11 Sum = 65 Program: #include #include #define NUM 10 int main() { int *c= new int[NUM]; for (int i =

[PATCH] D110803: [clang-format][docs][NFC] correct the "first supported versions" of some of the clang-format options

2021-09-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added a reviewer: HazardyKnusperkeks. MyDeveloperDay added projects: clang, clang-format. MyDeveloperDay requested review of this revision. Some of the first supported version field were incorrectly attributed to a later branch. It wasn't poss

[clang] 2c60cfc - [format] [docs] Fix typos and clarify QualifierAlignment/QualifierOrder documentation.

2021-09-30 Thread Marek Kurdej via cfe-commits
Author: Marek Kurdej Date: 2021-09-30T09:42:34+02:00 New Revision: 2c60cfc05f6fb32f128688c4cfffb09a978d539f URL: https://github.com/llvm/llvm-project/commit/2c60cfc05f6fb32f128688c4cfffb09a978d539f DIFF: https://github.com/llvm/llvm-project/commit/2c60cfc05f6fb32f128688c4cfffb09a978d539f.diff

[clang-tools-extra] d084c42 - Investigate failure in rGdd13f45e04366cc4f648b57ec87d20a5569e27c3

2021-09-30 Thread Kirill Bobyrev via cfe-commits
Author: Kirill Bobyrev Date: 2021-09-30T09:50:14+02:00 New Revision: d084c42bdfac4a5879bdabe645b14cf72f7685a7 URL: https://github.com/llvm/llvm-project/commit/d084c42bdfac4a5879bdabe645b14cf72f7685a7 DIFF: https://github.com/llvm/llvm-project/commit/d084c42bdfac4a5879bdabe645b14cf72f7685a7.diff

[clang-tools-extra] 87817bc - Fix the build after d084c42bdfac4a5879bdabe645b14cf72f7685a7

2021-09-30 Thread Kirill Bobyrev via cfe-commits
Author: Kirill Bobyrev Date: 2021-09-30T09:53:04+02:00 New Revision: 87817bc523daba1d2bd0492144a5d6adba8a649c URL: https://github.com/llvm/llvm-project/commit/87817bc523daba1d2bd0492144a5d6adba8a649c DIFF: https://github.com/llvm/llvm-project/commit/87817bc523daba1d2bd0492144a5d6adba8a649c.diff

[PATCH] D69764: [clang-format] Add Left/Right Const fixer capability

2021-09-30 Thread Simon Giesecke via Phabricator via cfe-commits
simon.giesecke added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:3233 + + ``QualifierAlignment`` COULD lead to incorrect code generation. + MyDeveloperDay wrote: > HazardyKnusperkeks wrote: > > simon.giesecke wrote: > > > This is pretty

[PATCH] D110614: [clang-tidy] Fix false positives in cppcoreguidelines-virtual-class-destructor

2021-09-30 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. So for some reason, in Sema, the following returns True: `dtor->isVirtual() ` However the clang-tidy matcher : `has(cxxDestructorDecl(isPublic(), isVirtual())),` Doesn't match this, and that's why we get the FPs. Why would that be, isn't `isVirtual` doing the sa

[PATCH] D110801: [clang-format] [docs] [NFC] improve clarity in the QualifierAlignment warning

2021-09-30 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM with typos fixed. Comment at: clang/include/clang/Format/Format.h:1903 + /// lead to incorrect code generation due to a lack of semantic information + /// especi

[PATCH] D110801: [clang-format] [docs] [NFC] improve clarity in the QualifierAlignment warning

2021-09-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/include/clang/Format/Format.h:1903 + /// lead to incorrect code generation due to a lack of semantic information + /// especially in the presense of macros, care should be take to review code + /// changes made by this

[PATCH] D110801: [clang-format] [docs] [NFC] improve clarity in the QualifierAlignment warning

2021-09-30 Thread Simon Giesecke via Phabricator via cfe-commits
simon.giesecke added inline comments. Comment at: clang/include/clang/Format/Format.h:1902 + /// Setting ``QualifierAlignment`` to something other than `Leave`, COULD + /// lead to incorrect code generation due to a lack of semantic information + /// especially in the pres

[PATCH] D110614: [clang-tidy] Fix false positives in cppcoreguidelines-virtual-class-destructor

2021-09-30 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Ahh, it seems that for templates, the class has this AST: |-ClassTemplateDecl line:7:8 Derived | |-TemplateTypeParmDecl col:20 typename depth 0 index 0 T | |-CXXRecordDecl line:7:8 struct Derived definition | `-ClassTemplateSpecializationDecl line:7:8 st

[PATCH] D110798: [NFC] Use CHECK-NEXT instead of CHECK-SAME in target-invalid-cpu-note.c

2021-09-30 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added a comment. > I found the old way cannot verify if there are some extra outputs between two > different CHECK-SAME. So I changed to CHECK-NEXT. In principle I agree but did you have this failure mode actually happen? > But it will introduce bad format issue. Anyway, the old w

[PATCH] D34654: Allow passing a regex for headers to exclude from clang-tidy

2021-09-30 Thread Alan via Phabricator via cfe-commits
aco added a comment. Hi, first of all I want to say that the name "HeaderFilterRegex" is a bit ambiguous, we don't know intuitively if we define what is filtered or what passes. in my humble opinion alexfh's proposal would be much easier to use than 2 regex. In D34654#3022728

[PATCH] D110614: [clang-tidy] Fix false positives in cppcoreguidelines-virtual-class-destructor

2021-09-30 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 376139. carlosgalvezp added a comment. Moved the condition of public-virtual / protected-non-virtual to the check stage instead of the match stage. This way is more similar to the equivalent Sema check and it passes all the tests. Let me know what you

[PATCH] D110801: [clang-format] [docs] [NFC] improve clarity in the QualifierAlignment warning

2021-09-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 376140. MyDeveloperDay added a comment. Try and improve the wordage CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110801/new/ https://reviews.llvm.org/D110801 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Format/Forma

[clang-tools-extra] 230a6ed - Revert "[clangd] Reland D110386"

2021-09-30 Thread Kirill Bobyrev via cfe-commits
Author: Kirill Bobyrev Date: 2021-09-30T11:37:07+02:00 New Revision: 230a6edb49c31e2c96613f5b7deefd4f4faf9a6d URL: https://github.com/llvm/llvm-project/commit/230a6edb49c31e2c96613f5b7deefd4f4faf9a6d DIFF: https://github.com/llvm/llvm-project/commit/230a6edb49c31e2c96613f5b7deefd4f4faf9a6d.diff

[PATCH] D110801: [clang-format] [docs] [NFC] improve clarity in the QualifierAlignment warning

2021-09-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. > We have no such indication but want to play safe until this has been tested > in the wild. We have no indication of issues yet, other than those of using macros, any we do find we would hope to fix, much like any other clang-format bug. I have run this on a nu

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-09-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. It would be good to get closure on this asap. @bader We had related discussions on the other reviews about the approach in this patch. If you have any concerns/suggestions can you please notify asap... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] e5e0e00 - [NFC] Cleanup the overload of ASTImporter::import()

2021-09-30 Thread Balazs Benics via cfe-commits
Author: Balazs Benics Date: 2021-09-30T11:53:08+02:00 New Revision: e5e0e00831ba093639edbd443b6e05b3118f8930 URL: https://github.com/llvm/llvm-project/commit/e5e0e00831ba093639edbd443b6e05b3118f8930 DIFF: https://github.com/llvm/llvm-project/commit/e5e0e00831ba093639edbd443b6e05b3118f8930.diff

[PATCH] D109269: [NFC] Cleanup the overload of ASTImporter::import()

2021-09-30 Thread Balázs Benics 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 rGe5e0e00831ba: [NFC] Cleanup the overload of ASTImporter::import() (authored by steakhal). Herald added a project: clang. Herald added a subscriber: c

[PATCH] D106102: [analyzer][solver] Introduce reasoning for not equal to operator

2021-09-30 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Okay, I don't see any problems besides this typo. BTW do you plan to implement other rules besides this in the future? E.g. we currently miss this: 'x < y' is `true` if `max(x) < min(y)`; and `false` if `min(x) >= max(y)` 'x > y', 'x <= y', etc. in a similar way.

[PATCH] D106409: [PowerPC] Truncate results for out of range values for vec_cts,vec_ctf

2021-09-30 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai requested changes to this revision. nemanjai added a comment. This revision now requires changes to proceed. I may be wrong, but I really think this is incorrect. Please do some functional (execution) testing on this. Also, please re-title this from "truncate results" to something like

[PATCH] D109902: [PowerPC] Improved codegen related to xscvdpsxws/xscvdpuxws

2021-09-30 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai accepted this revision. nemanjai added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109902/new/ https://reviews.llvm.org/D109902 ___ cfe-commits mailing list cfe-comm

[PATCH] D110618: [HIPSPV][2/4] Add HIPSPV tool chain

2021-09-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Considering that SPIR-V translation step is also required for other languages would it make sense to add `llvm-spirv` as a common tool like for example C/C++ linkers and create a bit of common infrastructure? It might be something we can do as a separate step too but

[PATCH] D110808: [APInt] Stop using soft-deprecated constructors and methods in clang. NFC.

2021-09-30 Thread Jay Foad via Phabricator via cfe-commits
foad created this revision. Herald added a subscriber: martong. foad requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a subscriber: cfe-commits. Stop using APInt constructors and methods that were soft-deprecated in D109483

[PATCH] D110810: [clang][ASTImporter] Simplify code of attribute import.

2021-09-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: steakhal, whisperity, martong, teemperor, gamesh411, Szelethus, dkrupp. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. balazske requested review of this revision. Herald added a project: clang. Herald added a subscribe

[clang] fad14a1 - [PowerPC] Truncate element index for vec_insert in altivec.h

2021-09-30 Thread Nemanja Ivanovic via cfe-commits
Author: Nemanja Ivanovic Date: 2021-09-30T05:58:22-05:00 New Revision: fad14a17a490b1825b0c7c40ace7e83c91af4b8a URL: https://github.com/llvm/llvm-project/commit/fad14a17a490b1825b0c7c40ace7e83c91af4b8a DIFF: https://github.com/llvm/llvm-project/commit/fad14a17a490b1825b0c7c40ace7e83c91af4b8a.di

[PATCH] D110273: [PowerPC] Fix lharx and lbarx builtin signatures

2021-09-30 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai accepted this revision. nemanjai added a comment. This revision is now accepted and ready to land. LGTM. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110273/new/ https://reviews.llvm.org/D110273 ___ cfe-commits mailing list

[PATCH] D110614: [clang-tidy] Fix false positives in cppcoreguidelines-virtual-class-destructor

2021-09-30 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D110614#3032818 , @carlosgalvezp wrote: > Moved the condition of public-virtual / protected-non-virtual to the check > stage instead of the match stage. This way is more similar to the equivalent > Sema check and it passe

[PATCH] D109703: [DebugInfo] Fix scope for local static variables

2021-09-30 Thread Kristina Bessonova via Phabricator via cfe-commits
krisb added a comment. @ellis I'd appreciate if you go ahead and fix the issues with inlined functions. Sorry for interrupting you in D108492 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109703/new/ https://re

[PATCH] D110670: [Sema] Allow comparisons between different ms ptr size address space types.

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:6682 + isPtrSizeAddressSpace(Q2.getAddressSpace())) +MaybeQ1 = true; + else akhuang wrote: > aaron.ballman wrote: > > I'm pretty sure this is correct

[PATCH] D110065: [AArch64] Add support for the 'R' architecture profile.

2021-09-30 Thread Alexandros Lamprineas via Phabricator via cfe-commits
labrinea added subscribers: nickdesaulniers, t.p.northover, srhines. labrinea added a comment. I wanted to clarify the chosen strategy as the desciption was perhaps not very informative. The are some instructions and system registers that are present in v8-a but not in v8-r, and so I am inclined

[PATCH] D110614: [clang-tidy] Fix false positives in cppcoreguidelines-virtual-class-destructor

2021-09-30 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 376168. carlosgalvezp added a comment. Created custom matcher and moved the logic from check to match stage. Documented why we can't simply match a CXXDestructorDecl. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110614/new/ https://reviews.l

[PATCH] D110614: [clang-tidy] Fix false positives in cppcoreguidelines-virtual-class-destructor

2021-09-30 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Thanks for the feedback @whisperity , I'm learning so many new things :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110614/new/ https://reviews.llvm.org/D110614 ___ cfe-commits mailing list cfe-commits@lists.

[clang-tools-extra] dea4807 - [clangd] Land D110386 again

2021-09-30 Thread Kirill Bobyrev via cfe-commits
Author: Kirill Bobyrev Date: 2021-09-30T14:41:27+02:00 New Revision: dea48079b90d40f2087435b778544dffb0ab1793 URL: https://github.com/llvm/llvm-project/commit/dea48079b90d40f2087435b778544dffb0ab1793 DIFF: https://github.com/llvm/llvm-project/commit/dea48079b90d40f2087435b778544dffb0ab1793.diff

[PATCH] D110586: Update `DynTypedNode` to support the conversion of `TypeLoc`s.

2021-09-30 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Looks good! Please add a test to be sure it compiles/works correctly. Thanks! Comment at: clang/include/clang/AST/ASTTypeTraits.h:56 /// Construct an identifier for T. - template - static ASTNodeKind getFromNodeKind() { + template static ASTNode

[PATCH] D110810: [clang][ASTImporter] Simplify code of attribute import.

2021-09-30 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Awesome! Thanks! Please indicate in the title that this is an [NFC]. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110810/new/ https://review

[PATCH] D108469: Improve handling of static assert messages.

2021-09-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Basic/Diagnostic.cpp:792 +static void pushEscapedString(StringRef Str, SmallVectorImpl &OutStr) { + OutStr.reserve(OutStr.size() + Str.size()); + const unsigned char *Begin = jfb wrote: > Can this addition o

[PATCH] D110823: [clangd] Add code completion of param name on /* inside function calls.

2021-09-30 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. adamcz requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. For example, if you have: void foo(int bar); foo(/*^ it s

[PATCH] D110824: [PowerPC] Fix to guard fetch and cas 64-bit builtin versions

2021-09-30 Thread Kamau Bridgeman via Phabricator via cfe-commits
kamaub created this revision. kamaub added reviewers: PowerPC, nemanjai, lei, amyk, stefanp. Herald added subscribers: shchenz, kbarton. kamaub requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The builtins: `__compare_and_swaplp`, `__fetch_a

[PATCH] D110825: [clangd] Handle members of anon structs in SelectionTree

2021-09-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: usaxena95, arphaman. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. References to fields inside ano

[PATCH] D110825: [clangd] Handle members of anon structs in SelectionTree

2021-09-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Selection.cpp:745 + if (auto *FD = llvm::dyn_cast(ME->getMemberDecl())) { +if (FD->getParent()->isAnonymousStructOrUnion()) + return SourceRange(ME->getMemberLoc(), ME->getEndLoc()); --

[PATCH] D110273: [PowerPC] Fix lharx and lbarx builtin signatures

2021-09-30 Thread Amy Kwan via Phabricator via cfe-commits
amyk added a comment. Additional nit regarding the description and comment: The signatures for the PowerPC builtins lharx and lbarx are incorrect, and causes issues when in a function that requiers the return of the builtin to be promoted. This patch fixes these signatures. Updated to: The sign

[PATCH] D109178: [PowerPC] Disable vector types when not supported by subtarget features

2021-09-30 Thread Amy Kwan via Phabricator via cfe-commits
amyk accepted this revision. amyk added a comment. Overall LGTM. Comment at: clang/test/CodeGen/builtins-ppc-int128.c:7 +// RUN: -triple powerpc64le-unknown-unknown -target-cpu pwr8 \ +// RUN: -emit-llvm %s -o - -U__XL_COMPAT_ALTIVEC__ | FileCheck %s -check-prefix=CHECK-LE

[PATCH] D109902: [PowerPC] Improved codegen related to xscvdpsxws/xscvdpuxws

2021-09-30 Thread Amy Kwan via Phabricator via cfe-commits
amyk added a comment. Additional nits regarding comments. Comment at: llvm/test/CodeGen/PowerPC/test-vector-insert.ll:20 ; RUN: -mcpu=pwr9 < %s | FileCheck %s --check-prefix=CHECK-BE-P9 ; xscvdpsxws and uxws is only available on Power7 and above ; Codgen is different for LE

[PATCH] D110770: [clang] Remove duplication in types::getCompilationPhases()

2021-09-30 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: clang/include/clang/Driver/Phases.h:25 IfsMerge, -LastPhase = IfsMerge, }; Any reason not to keep the LastPhase alias? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110770/new/ https://reviews.llvm.or

[PATCH] D110825: [clangd] Handle members of anon structs in SelectionTree

2021-09-30 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for fixing! Early-claim is a blunt hammer and I'm always dreading side-effects. This also feels a *lot* like implicit-this which is handled in another way. So that seems worth a shot, but this approach is fine if that one doesn't work. Commen

[PATCH] D110825: [clangd] Handle members of anon structs in SelectionTree

2021-09-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Selection.cpp:443 // It would be nice if RAV handled this (!shouldTraverseImplicitCode()). if (auto *CTI = llvm::dyn_cast(S)) if (CTI->isImplicit()) sammccall wrote: > seems like it'd

[PATCH] D110783: [clang] Make crash reproducer work with clang-cl

2021-09-30 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm, thanks for digging into this! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110783/new/ https://reviews.llvm.org/D110783 ___ cfe-commits

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseStmt.cpp:1520-1525 + if (IsConsteval) { +if (!isa_and_nonnull(ThenStmt.get())) { + Diag(ConstevalLoc, diag::err_expected_after) << "consteval" + << "{

[PATCH] D110833: [clang-format] Add ControlStatementsAndFunctionDefinitionsExceptControlMacros option to SpaceBeforeParens

2021-09-30 Thread Christian Rayroud via Phabricator via cfe-commits
crayroud created this revision. crayroud added reviewers: aaron.ballman, rsmith. crayroud added projects: clang, clang-format. crayroud requested review of this revision. For some projects the coding style defined requires to have a space before opening parentheses for function definitions. This

[PATCH] D108469: Improve handling of static assert messages.

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Btw, this CI failure looks relevant: https://reviews.llvm.org/harbormaster/unit/view/1055822/ but... it looks more relevant to the parent patch than this one (and the parent seems to have a clean CI). May be worth looking into whether this is an issue or not. =

[PATCH] D108469: Improve handling of static assert messages.

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Basic/Diagnostic.cpp:792 +static void pushEscapedString(StringRef Str, SmallVectorImpl &OutStr) { + OutStr.reserve(OutStr.size() + Str.size()); + const unsigned char *Begin = cor3ntin wrote: > jfb wrote

[PATCH] D108469: Improve handling of static assert messages.

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Basic/Diagnostic.cpp:792 +static void pushEscapedString(StringRef Str, SmallVectorImpl &OutStr) { + OutStr.reserve(OutStr.size() + Str.size()); + const unsigned char *Begin = aaron.ballman wrote: > cor3

[PATCH] D109632: [clang] de-duplicate methods from AST files

2021-09-30 Thread Richard Howell via Phabricator via cfe-commits
rmaz added a comment. In D109632#3032381 , @vsapsai wrote: > What's interesting, I was able to trigger more diagnostic. Specifically, I > got warnings about `length` ambiguity because in NSStatusItem it is CGFloat >

[clang-tools-extra] 38ec229 - [clangd] Update comment after dea48079b90d40f2087435b778544dffb0ab1793

2021-09-30 Thread Kirill Bobyrev via cfe-commits
Author: Kirill Bobyrev Date: 2021-09-30T16:45:10+02:00 New Revision: 38ec2292f0c2f25062705607b92502c0f9de3678 URL: https://github.com/llvm/llvm-project/commit/38ec2292f0c2f25062705607b92502c0f9de3678 DIFF: https://github.com/llvm/llvm-project/commit/38ec2292f0c2f25062705607b92502c0f9de3678.diff

[PATCH] D110836: [CMake] Fix typo in error message for LLD in bootstrap builds.

2021-09-30 Thread Frederic Cambus via Phabricator via cfe-commits
fcambus created this revision. fcambus added a reviewer: xgupta. Herald added a subscriber: mgorny. fcambus requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D110836 Files: cl

[PATCH] D108469: Improve handling of static assert messages.

2021-09-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D108469#3033475 , @aaron.ballman wrote: > Btw, this CI failure looks relevant: > https://reviews.llvm.org/harbormaster/unit/view/1055822/ but... it looks more > relevant to the parent patch than this one (and the parent see

[PATCH] D110772: [clang] Allow pointers from any address space to gfx90a builtins

2021-09-30 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 created this revision. gandhi21299 added reviewers: yaxunl, rampitec. gandhi21299 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Explicitly address space cast the pointer if its address space differs from the address space of t

[PATCH] D110772: [clang] Allow pointers from any address space to gfx90a builtins

2021-09-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/CodeGenHIP/unsafe-atomic-ops-gfx90a.hip:13 + else +return __builtin_amdgcn_global_atomic_fadd_f32(addr, value); +} I think we want to check the pointer argument passed to the atomic intrinsics to make sur

[PATCH] D110772: [clang] Allow pointers from any address space to gfx90a builtins

2021-09-30 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 376095. gandhi21299 marked an inline comment as done. gandhi21299 added a comment. - corrected test, address space cast should go under `unsafeAtomicAdd(...)` codegen Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D110772: [clang] Allow pointers from any address space to gfx90a builtins

2021-09-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:15764 +AddrParamTy->getPointerElementType() == AddrTy->getPointerElementType()) + Addr = Builder.CreateAddrSpaceCast(Addr, AddrParamTy); return Builder.CreateCall(F, {Addr, Val, ZeroI32,

[PATCH] D110825: [clangd] Handle members of anon structs in SelectionTree

2021-09-30 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/Selection.cpp:443 // It would be nice if RAV handled this (!shouldTraverseImplicitCode()). if (auto *CTI = llvm::dyn_cast(S)) if (CTI->isImplicit()) kadircet wrote: > sammccall wrote

[PATCH] D110825: [clangd] Handle members of anon structs in SelectionTree

2021-09-30 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/unittests/XRefsTests.cpp:368 +TEST(LocateSymbol, AnonymousStructFields) { + auto Code = Annotations(R"cpp( kadircet wrote: > sammccall wrote: > > This example is quite complicated to the poi

[PATCH] D109517: [Clang][ARM][AArch64] Add support for Armv9-A, Armv9.1-A and Armv9.2-A

2021-09-30 Thread Victor Campos via Phabricator via cfe-commits
vhscampos updated this revision to Diff 376228. vhscampos edited the summary of this revision. vhscampos added a comment. 1. Disable the cryptographic extensions by default. 2. Small fix in TargetParserTest.cpp to include different spellings of the -march values. Repository: rG LLVM Github Mo

[PATCH] D108441: [clang] Fix JSON AST output when a filter is used

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. The changes LGTM, though I'm not an expert in python. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108441/new/ https://reviews.ll

[PATCH] D110770: [clang] Remove duplication in types::getCompilationPhases()

2021-09-30 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang/include/clang/Driver/Phases.h:25 IfsMerge, -LastPhase = IfsMerge, }; hans wrote: > Any reason not to keep the LastPhase alias? I found it more confusing than helpful. `Link` and `LastPhase` both start wi

[PATCH] D110625: [analyzer] canonicalize special case of structure/pointer deref

2021-09-30 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. I think we need to get canonical types. Check, please, aliased types: struct s { int v; }; using T1 = s; typedef s T2; void foo(T1 *ps) { T2 ss = *ps; ... } Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D110825: [clangd] Handle members of anon structs in SelectionTree

2021-09-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 376238. kadircet marked 4 inline comments as done. kadircet added a comment. - Use `isImplicit` rather than `earlyClaim` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110825/new/ https://reviews.llvm.org/D1108

[PATCH] D110825: [clangd] Handle members of anon structs in SelectionTree

2021-09-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Selection.cpp:443 // It would be nice if RAV handled this (!shouldTraverseImplicitCode()). if (auto *CTI = llvm::dyn_cast(S)) if (CTI->isImplicit()) sammccall wrote: > kadircet wrote:

[PATCH] D110836: [CMake] Fix typo in error message for LLD in bootstrap builds.

2021-09-30 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta accepted this revision. xgupta added a comment. This revision is now accepted and ready to land. LGTM, Thanks! And @fcambus If you want to continue contributing to the llvm-project, I would suggest you ask for commit access so you can directly commit typo fixes without opening revisions.

[PATCH] D110641: Implement P0857R0 -Part B: requires clause for template-template params

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseTemplate.cpp:876 +/// In C++20: +/// template-head: [C++ temp.pre] +/// template '<' template-parameter-list '>' requires-clause[opt] erichkeane wrote: > aaron.ballman wrote: > >

[PATCH] D110641: Implement P0857R0 -Part B: requires clause for template-template params

2021-09-30 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Parse/ParseTemplate.cpp:923 + // Skip until the semi-colon or a '}'. + SkipUntil(tok::r_brace, StopAtSemi | StopBeforeMatch); + TryConsumeToken(tok::semi); aaron.ballman wrote: > erichkeane wr

[PATCH] D110641: Implement P0857R0 -Part B: requires clause for template-template params

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseTemplate.cpp:923 + // Skip until the semi-colon or a '}'. + SkipUntil(tok::r_brace, StopAtSemi | StopBeforeMatch); + TryConsumeToken(tok::semi); erichkeane wrote: > aaron.ballman

[PATCH] D110836: [CMake] Fix typo in error message for LLD in bootstrap builds.

2021-09-30 Thread Frederic Cambus via Phabricator via cfe-commits
fcambus added a comment. @xgupta Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110836/new/ https://reviews.llvm.org/D110836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 376245. cor3ntin added a comment. Add support for attributes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110482/new/ https://reviews.llvm.org/D110482 Files: clang/include/clang/AST/Stmt.h clang/include/

[PATCH] D110833: [clang-format] Add ControlStatementsAndFunctionDefinitionsExceptControlMacros option to SpaceBeforeParens

2021-09-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. First impressions is `ControlStatementsAndFunctionDefinitionsExceptControlMacros` is a mouthful... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110833/new/ https://reviews.llvm.org/D110833

[PATCH] D110833: [clang-format] Add ControlStatementsAndFunctionDefinitionsExceptControlMacros option to SpaceBeforeParens

2021-09-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I feel this is going the way of BraceWrapping in that it should be: SpaceBeforeParens: - BeforeMacro: false - BeforeFunction: true Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110833/new/ https://revie

[PATCH] D110810: [clang][ASTImporter] Simplify code of attribute import [NFC].

2021-09-30 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:8456 class AttrImporter { - Error Err = Error::success(); + Error &Err; ASTImporter &Importer; I am enthusiastic about reference members if we can somehow avoid them. Can we use a stru

[PATCH] D110485: Support [[no_unique_address]] for all targets.

2021-09-30 Thread cqwrteur via Phabricator via cfe-commits
expnkx added a comment. In D110485#3030874 , @erichkeane wrote: > In D110485#3030853 , @expnkx wrote: > >> clang simply just does not truly support everything msvc supports. There are >> no things that deals [[m

[PATCH] D110825: [clangd] Handle members of anon structs in SelectionTree

2021-09-30 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks! Comment at: clang-tools-extra/clangd/Selection.cpp:446 return true; + // Make sure anonymous structs don't end up owning tokens. + if (auto *ME = llvm:

[PATCH] D110485: Support [[no_unique_address]] for all targets.

2021-09-30 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D110485#3033889 , @expnkx wrote: > In D110485#3030874 , @erichkeane > wrote: > >> In D110485#3030853 , @expnkx wrote: >> >>> clang simply j

[PATCH] D110641: Implement P0857R0 -Part B: requires clause for template-template params

2021-09-30 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 376257. erichkeane added a comment. Change the skip-until code after a requires-clause failed parse. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110641/new/ https://reviews.llvm.org/D110641 Files: clang/lib/Parse/ParseTemplate.cpp clang/te

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-30 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 reclaimed this revision. gandhi21299 added a comment. Sorry, that was a mistake. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 ___ cfe-commits mai

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Even just building Clang with this enabled revealed... a lot... Some of them are easy to address (having tablegen disable the warning in generated code), some of them are exactly the kind of thing I wanted to warn on, and some of them are more complicated. Based on that

[PATCH] D110485: Support [[no_unique_address]] for all targets.

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D110485#3033889 , @expnkx wrote: > https://github.com/microsoft/STL/issues/1364 > > As Microsoft said, the reason why things like msvc::no_unique_address exist > are because clang does not support it. In fact, it has bec

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-30 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. inline-calls.ll failed on gfx908 due to the change in SIISelLowering.cpp, line 3015. Without the change, there is a failure in AMDGPUResourceAnalysis.cpp, line 65 because Op.getGlobal() is not a Function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-09-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added a comment. @rpbeltran @nathanchance @aaron.ballman Are you OK with the current state of this patch? Well, it is clear that some code in linux kernel/Chromium/etc needs to adjusted, but I think in many cases it would (atleast) improve read

[PATCH] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-09-30 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. As far as I am aware, this iteration of the patch has no instances in the Linux kernel now. The instances I found with the first iteration of the patch only had a right hand side with side effects, not both sides, so this warning is effectively a no-op now (not tha

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Why just no special case "= {0};" pattern and do not warn in that case? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110656/new/ https://reviews.llvm.org/D110656 ___ cfe-commit

[PATCH] D110586: Update `DynTypedNode` to support the conversion of `TypeLoc`s.

2021-09-30 Thread Samuel Benzaquen via Phabricator via cfe-commits
sbenza added inline comments. Comment at: clang/include/clang/AST/ASTTypeTraits.h:472 + assert(ASTNodeKind::getFromNodeKind().isBaseOf(NodeKind)); + return *static_cast(reinterpret_cast(Storage)); +} The create/get don't seem to match. We are constr

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D110656#3034083 , @xbolva00 wrote: > Why just no special case "= {0};" pattern and do not warn in that case? This was what I was thinking. I was basing that on the idea that `= { 0 }` to zero init the entire array is fa

[PATCH] D110858: [PowerPC] Implement vector float and vector double version for vec_orc builtin

2021-09-30 Thread Albion Fung via Phabricator via cfe-commits
Conanap created this revision. Conanap added reviewers: PowerPC, nemanjai, kamaub, saghir. Conanap added projects: LLVM, clang, PowerPC. Herald added a subscriber: kbarton. Conanap requested review of this revision. The builtin for vec_orc has support for the following two signatures, but currentl

[PATCH] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-09-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 376279. xbolva00 added a comment. Updated warning-wall.c test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108003/new/ https://reviews.llvm.org/D108003 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang/Basic/Diagnostic

  1   2   >