[PATCH] D75159: [clang-tidy] Fix PR#37210 'Out-of-class template constructor only half-fixed with modernize-pass-by-value'

2020-02-27 Thread Karasev Nikita via Phabricator via cfe-commits
f00kat added a comment. Can you commit it please? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75159/new/ https://reviews.llvm.org/D75159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D75271: [Analyzer][NFC] Add AnalyzerOptions parameter to shouldRegisterXXX() functions

2020-02-27 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In D75271#1896724 , @Szelethus wrote: > Let's change this to either `CheckerManger` or `AnalysisManager`. Did you read my comments? I tried `CheckerManager` first, but it does not work, because `CheckerRegistry` does

[PATCH] D74801: [ADT][NFC] SCCIterator: Change hasLoop() to hasCycle()

2020-02-27 Thread Stefanos Baziotis via Phabricator via cfe-commits
baziotis added a comment. In D74801#1897267 , @lattner wrote: > Seems fine to me. Thank you! Please note that I don't have commit access. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74801/new/ https://reviews.llvm.org/D74801

[PATCH] D74801: [ADT][NFC] SCCIterator: Change hasLoop() to hasCycle()

2020-02-27 Thread Chris Lattner via Phabricator via cfe-commits
lattner accepted this revision. lattner added a comment. Seems fine to me. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74801/new/ https://reviews.llvm.org/D74801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D75285: Mark restrict pointer or reference to const as invariant

2020-02-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D75285#1896458 , @rjmccall wrote: > Unfortunately, `const` also doesn't mean that the memory doesn't change. It > does mean it can't be changed through this pointer, but `restrict` allows you > to derive more pointers from

[PATCH] D70172: [CUDA][HIP][OpenMP] Emit deferred diagnostics by a post-parsing AST travese

2020-02-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. I still got assertion when I use the built clang with check-mlir. The reduced testcase is class A { public: int foo(); }; static A a; struct B { B(int x = a.foo()); }; void test() { B x; } The assertion I got is: clang:

[PATCH] D74918: Add method to TargetInfo to get CPU cache line size

2020-02-27 Thread Zoe Carver via Phabricator via cfe-commits
zoecarver added a comment. Here's what I think we should do: continue to have this method just return the cache line size. Then have another method that returns `true` or `false` for whether the given architecture supports aligned pairs of cache lines then, users of this (either in clang or

[PATCH] D74361: [Clang] Undef attribute for global variables

2020-02-27 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/test/CodeGenCXX/attr-no-zero-initializer.cpp:40 +// CHECK: @unt = global %struct.nontrivial undef +nontrivial unt [[clang::no_zero_initializer]]; Can you explain a bit about how this interacts with C++

[PATCH] D74361: [Clang] Undef attribute for global variables

2020-02-27 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield updated this revision to Diff 247156. JonChesterfield added a comment. - clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74361/new/ https://reviews.llvm.org/D74361 Files: clang/include/clang/Basic/Attr.td

[PATCH] D75323: Support relative dest paths in headermap files

2020-02-27 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta requested changes to this revision. takuto.ikuta added a comment. This revision now requires changes to proceed. add test? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75323/new/ https://reviews.llvm.org/D75323

[PATCH] D75323: Support relative dest paths in headermap files

2020-02-27 Thread Simon Que via Phabricator via cfe-commits
sque created this revision. sque added reviewers: vsapsai, arphaman, akyrtzi. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. Existing behavior: - If hmap dest path is absolute: = Look for the file and return it as result. = If file not found, return None. - If

[PATCH] D75310: [CUDA, clang-cl] Filter out unsupported arguments for device-side compilation.

2020-02-27 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a subscriber: hans. rnk added a comment. This revision is now accepted and ready to land. lgtm, but let us ask @hans for a second opinion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75310/new/

[clang] b6f605c - Change test to use -S so it works when an external assembler is used that is not present in the testing environment.

2020-02-27 Thread Douglas Yung via cfe-commits
Author: Douglas Yung Date: 2020-02-27T16:51:57-08:00 New Revision: b6f605cec5af0c4191de63de4b30ad984716f8a5 URL: https://github.com/llvm/llvm-project/commit/b6f605cec5af0c4191de63de4b30ad984716f8a5 DIFF: https://github.com/llvm/llvm-project/commit/b6f605cec5af0c4191de63de4b30ad984716f8a5.diff

[PATCH] D75319: Remove unused parameter from CXXRecordDecl::forallBases

2020-02-27 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added reviewers: aaron.ballman, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. Apparently all users of the function were fine with short-circuiting and none cared to override the default argument. Repository: rG

[PATCH] D75311: [modules] Allow frameworks to have only a private module without a public one.

2020-02-27 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Sounds great! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75311/new/ https://reviews.llvm.org/D75311

[PATCH] D74361: [Clang] Undef attribute for global variables

2020-02-27 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. In D74361#1879559 , @rjmccall wrote: > This will need to impact static analysis and the AST, I think. Local > variables can't be redeclared, but global variables can, so disallowing > initializers syntactically when the

[PATCH] D74361: [Clang] Undef attribute for global variables

2020-02-27 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield marked an inline comment as done. JonChesterfield added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:6509 +static void handleNoZeroInitializerAttr(Sema , Decl *D, const ParsedAttr ) { + D->addAttr(::new (S.Context)

[PATCH] D74361: [Clang] Uninitialize attribute on global variables

2020-02-27 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield updated this revision to Diff 247127. JonChesterfield added a comment. - Rename attribute, add to hasDefiningAttr Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74361/new/ https://reviews.llvm.org/D74361 Files:

[PATCH] D75311: [modules] Allow frameworks to have only a private module without a public one.

2020-02-27 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked an inline comment as done. vsapsai added a comment. Looks like other module-related tracking like `LoadedModuleMaps`, `DirectoryHasModuleMap` works without extra changes. And `ModuleMapParser` relies on a file name to decide if a module map is private or not, so the presence of

[PATCH] D75311: [modules] Allow frameworks to have only a private module without a public one.

2020-02-27 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: bruno, Bigcheese. Herald added subscribers: ributzka, dexonsmith, jkorous. Herald added a project: clang. vsapsai marked an inline comment as done. vsapsai added a comment. Looks like other module-related tracking like `LoadedModuleMaps`,

[PATCH] D72872: [ObjC generics] Fix not inheriting type bounds in categories/extensions.

2020-02-27 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72872/new/ https://reviews.llvm.org/D72872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D75289: [clang-tidy] Added virtual isLanguageVersionSupported to ClangTidyCheck

2020-02-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D75289#1896925 , @njames93 wrote: > In D75289#1896902 , @Eugene.Zelenko > wrote: > > > Language and/or its standard is checked in other places too. Should all > > similar places

[PATCH] D74918: Add method to TargetInfo to get CPU cache line size

2020-02-27 Thread Olivier Giroux via Phabricator via cfe-commits
__simt__ added a comment. (//I assume I'm not seeing a code review being used to veto a C++ Standard feature, but actually the other points are the reason for the red flag.//) I can see a desire for hyper-precise definitions to achieve the best possible performance, but we really need a

[PATCH] D75289: [clang-tidy] Added virtual isLanguageVersionSupported to ClangTidyCheck

2020-02-27 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D75289#1896902 , @Eugene.Zelenko wrote: > Language and/or its standard is checked in other places too. Should all > similar places be refactored? They should but I feel they should be in follow up patches, the only reason

[PATCH] D75310: [CUDA, clang-cl] Filter out unsupported arguments for device-side compilation.

2020-02-27 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added a reviewer: rnk. Herald added subscribers: sanjoy.google, bixia. Herald added a project: clang. Device-side compilation does not support some features and we need to filter them out when command line options enable them for the host. We're already doing this

[PATCH] D75289: [clang-tidy] Added virtual isLanguageVersionSupported to ClangTidyCheck

2020-02-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Language and/or its standard is checked in other places too. Should all similar places be refactored? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75289/new/ https://reviews.llvm.org/D75289

[PATCH] D72875: [clang][cmake] Include generated rst files in html built by docs-clang-html target

2020-02-27 Thread Tom Stellard via Phabricator via cfe-commits
tstellar updated this revision to Diff 247123. tstellar marked 4 inline comments as done. tstellar added a comment. Address most recent review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72875/new/ https://reviews.llvm.org/D72875

Re: [clang] 83f4372 - [CodeGen] fix clang test that runs the optimizer pipeline; NFC

2020-02-27 Thread Eric Christopher via cfe-commits
Sure. That sounds great. Thanks! On Wed, Feb 26, 2020 at 10:45 AM Sanjay Patel wrote: > To be clear - the test is checking IR instructions, but it's checking -O1 > IR for various targets. > So there must be different expectations per target... > But I just tried a test of turning everything

[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause

2020-02-27 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen updated this revision to Diff 247122. cchen added a comment. Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75077/new/ https://reviews.llvm.org/D75077 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

Re: [clang] d930ed1 - Disallow use of __has_c_attribute in C++ mode.

2020-02-27 Thread James Y Knight via cfe-commits
That all makes sense -- especially the bits about the dates needing to be different. But, even with all that, I'm not sure why we shouldn't implement both __has_cpp_attribute AND __has_c_attribute in C++ mode? The subset of C attributes which retain their C-defined semantics in C++ (which,

[PATCH] D69591: Devirtualize a call on alloca without waiting for post inline cleanup and next DevirtSCCRepeatedPass iteration.

2020-02-27 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. Here's a fix: https://reviews.llvm.org/D75307 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69591/new/ https://reviews.llvm.org/D69591 ___ cfe-commits mailing list

[clang] 4c2a656 - Avoid ASTContext.h -> TargetInfo.h dep

2020-02-27 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2020-02-27T14:35:00-08:00 New Revision: 4c2a6567bb12559cfc091bca2b25ae907cbd4e0f URL: https://github.com/llvm/llvm-project/commit/4c2a6567bb12559cfc091bca2b25ae907cbd4e0f DIFF: https://github.com/llvm/llvm-project/commit/4c2a6567bb12559cfc091bca2b25ae907cbd4e0f.diff

[clang] 0f6959f - Add some missing header dependencies

2020-02-27 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2020-02-27T14:32:12-08:00 New Revision: 0f6959f3632a1131fe74f7dde33cc52778b02280 URL: https://github.com/llvm/llvm-project/commit/0f6959f3632a1131fe74f7dde33cc52778b02280 DIFF: https://github.com/llvm/llvm-project/commit/0f6959f3632a1131fe74f7dde33cc52778b02280.diff

Re: Buildbot cleaning for zorg upgrade

2020-02-27 Thread Galina Kistanova via cfe-commits
Hello Michael, Thanks for adding those polly bots! Please feel free to stage the new bots. Everything is ready on the staging build bot. You can point them to lab.llvm.org:9994 and make sure they are reliably green. Thanks Galina On Tue, Feb 25, 2020 at 9:44 PM Michael Kruse wrote: >

[PATCH] D72041: [clangd] Handle go-to-definition in macro invocations where the target appears in the expansion multiple times

2020-02-27 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked 4 inline comments as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/Selection.cpp:261 + // consider it selected. + if (!SeenMacroCalls.insert(ArgStart).second) { +return NoTokens; sammccall wrote: >

[PATCH] D72041: [clangd] Handle go-to-definition in macro invocations where the target appears in the expansion multiple times

2020-02-27 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 247106. nridge marked an inline comment as done. nridge added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72041/new/ https://reviews.llvm.org/D72041 Files:

[PATCH] D73245: Depend stddef.h to provide max_align_t for C++11 and provide better fallback in

2020-02-27 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D73245#1894420 , @EricWF wrote: > @ldionne Since this has the possibility of breaking existing users of > `std::max_align_t`, can you test this against your c++03 codebases? I have no opinion about this patch, but I

[PATCH] D75162: [X86][F16C] Remove cvtph2ps intrinsics and use generic half2float conversion (PR37554)

2020-02-27 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D75162#1896469 , @RKSimon wrote: > In D75162#1896365 , @craig.topper > wrote: > > > Should we check that this generates constrained.fpext in strict mode? > > > Sure - where is the

[PATCH] D75162: [X86][F16C] Remove cvtph2ps intrinsics and use generic half2float conversion (PR37554)

2020-02-27 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I've posted https://reviews.llvm.org/D75304 to make the backend recognize the strict version of this pattern. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75162/new/ https://reviews.llvm.org/D75162

Re: [PATCH] D74918: Add method to TargetInfo to get CPU cache line size

2020-02-27 Thread Eric Christopher via cfe-commits
I'm agreed with James on all points fwiw. On Thu, Feb 27, 2020, 2:00 PM James Y Knight via Phabricator < revi...@reviews.llvm.org> wrote: > jyknight requested changes to this revision. > jyknight added a comment. > This revision now requires changes to proceed. > > In D74918#1885869

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-02-27 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 247104. akhuang added a comment. Just change CodeViewDebug to add CxxReturnUdt to all methods that return a record type, which appears to be consistent with what msvc does and avoids emitting two versions of the method in the pdb file. Repository: rG

[PATCH] D74918: Add method to TargetInfo to get CPU cache line size

2020-02-27 Thread James Y Knight via Phabricator via cfe-commits
jyknight requested changes to this revision. jyknight added a comment. This revision now requires changes to proceed. In D74918#1885869 , @zoecarver wrote: > @jyknight It would probably be best if we could account for CPUs who like to > use aligned pairs

[PATCH] D75279: Avoid SourceManager.h include in RawCommentList.h, add missing incs

2020-02-27 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG86565c130942: Avoid SourceManager.h include in RawCommentList.h, add missing incs (authored by rnk). Repository: rG

[clang] 86565c1 - Avoid SourceManager.h include in RawCommentList.h, add missing incs

2020-02-27 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2020-02-27T13:49:40-08:00 New Revision: 86565c13094236e022d2238f5653641aaca7d31f URL: https://github.com/llvm/llvm-project/commit/86565c13094236e022d2238f5653641aaca7d31f DIFF: https://github.com/llvm/llvm-project/commit/86565c13094236e022d2238f5653641aaca7d31f.diff

[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause

2020-02-27 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen added a comment. In D75077#1896708 , @cchen wrote: > Add back the check of UO_Deref Haven't added tests for some prohibited test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75077/new/

[PATCH] D75271: [Analyzer][NFC] Add AnalyzerOptions parameter to shouldRegisterXXX() functions

2020-02-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus requested changes to this revision. Szelethus added a comment. This revision now requires changes to proceed. Let's change this to either `CheckerManger` or `AnalysisManager`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75271/new/

[PATCH] D74918: Add method to TargetInfo to get CPU cache line size

2020-02-27 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:1786 +// i386 +case CK_i386: +// Netburst I found the documentation for the 82385 cache controller chip for the 386. It's a bit weird. The tags for the cache are based

[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause

2020-02-27 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen updated this revision to Diff 247101. cchen added a comment. Add back the check of UO_Deref Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75077/new/ https://reviews.llvm.org/D75077 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause

2020-02-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Also, would be good to add more tests for the situations that should not be handled, like just `(a+b)`, explicit casts, etc. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9966 +def err_omp_non_lvalue_in_map_or_motion_clauses: Error< +

[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause

2020-02-27 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen updated this revision to Diff 247095. cchen added a comment. Fix based on feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75077/new/ https://reviews.llvm.org/D75077 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause

2020-02-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:15684-15685 + bool VisitUnaryOperator(UnaryOperator *UO) { +if (SemaRef.getLangOpts().OpenMP < 50 || UO->getOpcode() != UO_Deref || +!UO->isLValue()) { + emitErrorMsg();

[PATCH] D75153: [ThinLTO] Allow usage of all SMT threads in the system

2020-02-27 Thread Robert Richmond via Phabricator via cfe-commits
RobRich999 added a comment. Based upon the description, I think this patch is more applicable than just targeting a specific AMD proc family since it allows the end-user a choice for maximizing threading with both CMT and SMT on all supported platforms. BTW, until if/when this patch lands, I

[PATCH] D75285: Mark restrict pointer or reference to const as invariant

2020-02-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D75285#1896400 , @hfinkel wrote: > Unfortunately, we cannot do this kind of thing just because it seems to make > sense. The language semantics must be exactly satisfied by the IR-level > semantics. I certainly agree that it

[PATCH] D72100: Allow matching "any file" in `VerifyDiagnosticConsumer`.

2020-02-27 Thread Alexandre Rames via Phabricator via cfe-commits
arames updated this revision to Diff 247087. arames added a comment. Rename and clarify. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72100/new/ https://reviews.llvm.org/D72100 Files: clang/include/clang/Frontend/VerifyDiagnosticConsumer.h

[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause

2020-02-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:15684-15685 + bool VisitUnaryOperator(UnaryOperator *UO) { +if (SemaRef.getLangOpts().OpenMP < 50 || UO->getOpcode() != UO_Deref || +!UO->isLValue()) { + emitErrorMsg();

[PATCH] D75285: Mark restrict pointer or reference to const as invariant

2020-02-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Are you sure `restrict` alone isn't good enough? It doesn't directly tell you that the memory is invariant, but it's usually simple to prove that the memory isn't modified within the `restrict` scope, which might be sufficient. CHANGES SINCE LAST ACTION

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-27 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SuspiciousIncludeCheck.cpp:44 + RawStringRecommendedExtensions(Options.getLocalOrGlobal( + "RecommendedExtensions", utils::defaultHeaderFileExtensions())) { + if

[PATCH] D75285: Mark restrict pointer or reference to const as invariant

2020-02-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. If this is not the right way to tell the compiler a memory pointed to by a pointer is invariant, what is the recommended way? Can we introduce clang builtins for llvm.invariant.start and llvm.invariant.end to allow user to specify that? Thanks. CHANGES SINCE LAST

[PATCH] D67537: [clangd] Client-side support for inactive regions

2020-02-27 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:193 + if (scopes[0] == "meta.disabled") { +this.inactiveDecorationIndex = index; +return

[PATCH] D75298: [Clang][SVE] Parse builtin type string for scalable vectors

2020-02-27 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: efriedma, rjmccall, rovka, rsandifo-arm. Herald added subscribers: psnobl, rkruppe, kristof.beyls, tschuett, mgorny. Herald added a reviewer: rengolin. Herald added a project: clang. This patch adds 'q' to mean 'scalable vector' in the

[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause

2020-02-27 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen updated this revision to Diff 247073. cchen added a comment. Fix test and add check for unary operator. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75077/new/ https://reviews.llvm.org/D75077 Files:

[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause

2020-02-27 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen updated this revision to Diff 247075. cchen marked 14 inline comments as done. cchen added a comment. Remove redundant else Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75077/new/ https://reviews.llvm.org/D75077 Files:

[PATCH] D67537: [clangd] Client-side support for inactive regions

2020-02-27 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 247077. nridge added a comment. Update to use 'clangd.preprocessor.inactive' as the scope name for inactive lines Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67537/new/ https://reviews.llvm.org/D67537

[PATCH] D75223: [clang-offload-wrapper] Lower priority of __tgt_register_lib in favor of __tgt_register_requires

2020-02-27 Thread Vyacheslav Zakharin via Phabricator via cfe-commits
vzakhari added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75223/new/ https://reviews.llvm.org/D75223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D75292: [clangd] Remove the word 'toy' from the description of vscode-clangd

2020-02-27 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. We could go a step further and describe it as the "reference client" for clangd, but I'm not sure how accurate / desirable that is at this stage. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75292/new/

[PATCH] D75289: [clang-tidy] Added virtual isLanguageVersionSupported to ClangTidyCheck

2020-02-27 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, Eugene.Zelenko, JonasToth, alexfh, hokein. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, xazax.hun. Herald added a project: clang. Motivated by Tune inspections to a specific

[PATCH] D75162: [X86][F16C] Remove cvtph2ps intrinsics and use generic half2float conversion (PR37554)

2020-02-27 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. In D75162#1896365 , @craig.topper wrote: > Should we check that this generates constrained.fpext in strict mode? Sure - where is the best place(s) to test this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75292: [clangd] Remove the word 'toy' from the description of vscode-clangd

2020-02-27 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. nridge added a comment. We could go a step further and describe it as the "reference client" for clangd, but I'm not sure how

[PATCH] D75285: Mark restrict pointer or reference to const as invariant

2020-02-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Unfortunately, `const` also doesn't mean that the memory doesn't change. It does mean it can't be changed through this pointer, but `restrict` allows you to derive more pointers from it within the `restrict` scope, and those pointers can remove the `const`

[PATCH] D74918: Add method to TargetInfo to get CPU cache line size

2020-02-27 Thread Zoe Carver via Phabricator via cfe-commits
zoecarver added a comment. Friendly ping. Any other comments on this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74918/new/ https://reviews.llvm.org/D74918 ___ cfe-commits mailing list

[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause

2020-02-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_update_codegen.cpp:374 + // CK6-64-DAG: [[IDX_EXT]] = sext i32 [[TWO:%.+]] to i64 + // CK6-DAG: [[TWO:%.+]] = load i32, i32* [[L_ADDR:%.+]] + // CK6-DAG: store i32 [[L:%.+]], i32* [[L_ADDR]]

[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause

2020-02-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:15710 +// know the other subtree is just an offset) +assert(BO->getType()->isPointerType() && + "Expect the binary operator be pointer type"); cchen wrote: > cchen wrote:

[PATCH] D74387: [SYCL] Do not diagnose use of __float128

2020-02-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D74387#1895264 , @Fznamznon wrote: > @rjmccall, Thank you very much for so detailed response, It really helps. I > started working on implementation and I have a couple of questions/problems > with this particular appoach. >

[PATCH] D75271: [Analyzer][NFC] Add AnalyzerOptions parameter to shouldRegisterXXX() functions

2020-02-27 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. > ! In D75271#1896223 , @Szelethus > wrote: > Thinking back, I did have a number of failed attempts to make something a > bit less ugly, but the sharp divide between the 2 libraries makes is >

[PATCH] D75279: Avoid SourceManager.h include in RawCommentList.h, add missing incs

2020-02-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75279/new/ https://reviews.llvm.org/D75279 ___ cfe-commits mailing list

[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause

2020-02-27 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen marked an inline comment as done. cchen added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:15710 +// know the other subtree is just an offset) +assert(BO->getType()->isPointerType() && + "Expect the binary operator be pointer type");

[PATCH] D75285: Mark restrict pointer or reference to const as invariant

2020-02-27 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel requested changes to this revision. hfinkel added a comment. This revision now requires changes to proceed. Unfortunately, we cannot do this kind of thing just because it seems to make sense. The language semantics must be exactly satisfied by the IR-level semantics. I certainly agree

[PATCH] D31343: Add an attribute plugin example

2020-02-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/examples/Attribute/Attribute.cpp:35 + } + virtual bool handleDeclAttribute(Sema , Decl *D, + const ParsedAttr ) const { john.brawn wrote: > aaron.ballman wrote: > > It is

[PATCH] D31342: Add ParsedAttrInfo::handleDeclAttribute

2020-02-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ClangPlugins.rst:105 + target. + Putting it all together It might also be nice to link to the example code from D31343 from the documentation to help get users started. e.g., "To see a working

[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause

2020-02-27 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen marked 2 inline comments as done. cchen added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:15710 +// know the other subtree is just an offset) +assert(BO->getType()->isPointerType() && + "Expect the binary operator be pointer type");

[PATCH] D75162: [X86][F16C] Remove cvtph2ps intrinsics and use generic half2float conversion (PR37554)

2020-02-27 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Should we check that this generates constrained.fpext in strict mode? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75162/new/ https://reviews.llvm.org/D75162 ___

[PATCH] D75286: [clangd] Handle clang-tidy suppression comments for diagnostics inside macro expansions

2020-02-27 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Not handling this was a side-effect of being overly cautious when trying to avoid reading files

[PATCH] D75279: Avoid SourceManager.h include in RawCommentList.h, add missing incs

2020-02-27 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. Nice, lgtm! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75279/new/ https://reviews.llvm.org/D75279 ___ cfe-commits mailing list

[PATCH] D75285: Mark restrict pointer or reference to const as invariant

2020-02-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: rjmccall. We saw users intend to use `const int* restrict` to indicate the memory pointed to by the pointer is invariant. This makes sense since restrict means the memory is not aliased by any other pointers whereas const means the memory

[PATCH] D31342: Add ParsedAttrInfo::handleDeclAttribute

2020-02-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ClangPlugins.rst:89 +The members of ``ParsedAttrInfo`` that a plugin attribute must define are: + * ``AttrKind``, which must be set to ``ParsedAttr::NoSemaHandlerAttribute``. + * ``Spellings``, which must be populated

[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause

2020-02-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:15690 + return false; +if (!UO->isLValue()) { + emitErrorMsg(); Hmm, addr_of creates rvalues. Comment at: clang/lib/Sema/SemaOpenMP.cpp:15693 + return

[PATCH] D75261: [clang-format] Recognize C# nullable types

2020-02-27 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/Format/FormatTestCSharp.cpp:609 + + verifyFormat(R"(public float? Value;)", Style); // no space before `?`. +} Could

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SuspiciousIncludeCheck.cpp:76 + + const auto SE = utils::getFileExtension(FileName, Check.SuspiciousExtensions); + if (!SE) Please don't use `auto` here (the type isn't

[PATCH] D68887: [clang-tidy] Copy the Ranges field from the Diagnostic when creating the ClangTidyError

2020-02-27 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68887/new/ https://reviews.llvm.org/D68887 ___ cfe-commits mailing list

[PATCH] D75271: [Analyzer][NFC] Add AnalyzerOptions parameter to shouldRegisterXXX() functions

2020-02-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D75271#1896182 , @Szelethus wrote: > > Also this entire callback should be removed ideally: it has to be a virtual > > function defaulting to `return true;` and if someone needs this feature > > could rewrite the behavior.

[PATCH] D75279: Avoid SourceManager.h include in RawCommentList.h, add missing incs

2020-02-27 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. rnk added reviewers: aaron.ballman, hans. Herald added a reviewer: teemperor. Herald added subscribers: lldb-commits, arphaman. Herald added projects: clang, LLDB. SourceManager.h includes FileManager.h, which is expensive due to dependencies on LLVM FS headers. Remove

[PATCH] D75277: [WebAssembly] Remove restriction on main name mangling

2020-02-27 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: cfe-commits, sunfish, aheejin, jgravelle-google, dschuff. Herald added a project: clang. Emscripten now handles/supports this new mode. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75277 Files:

[PATCH] D66564: [clang-tidy] new altera struct pack align check

2020-02-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D66564#1895980 , @Eugene.Zelenko wrote: > In D66564#1895916 , @aaron.ballman > wrote: > > > Are you aware of plans that you or others have for adding additional checks > > to

[PATCH] D75271: [Analyzer][NFC] Add AnalyzerOptions parameter to shouldRegisterXXX() functions

2020-02-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a reviewer: Charusso. Szelethus added a comment. In D75271#1895900 , @Charusso wrote: > I am so sorry to mention, but we need the `AnalysisManager` to pass around > which manages the analysis, therefore it knows both the `LangOptions` and

[PATCH] D75057: Syndicate, test and fix base64 implementation

2020-02-27 Thread serge via Phabricator via cfe-commits
serge-sans-paille marked 3 inline comments as done. serge-sans-paille added inline comments. Comment at: llvm/unittests/Support/Base64Test.cpp:30 + // from: https://tools.ietf.org/html/rfc4648#section-10 + TestBase64("", ""); + TestBase64("f", "Zg=="); hokein

[PATCH] D69782: Summary: Instead of dropping all the ranges associated with a Diagnostic when converting them to a ClangTidy error, instead attach them to the ClangTidyError, so they can be consumed b

2020-02-27 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Next step is to plumb this to clang-tidy. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69782/new/ https://reviews.llvm.org/D69782 ___ cfe-commits mailing list

[PATCH] D75057: Syndicate, test and fix base64 implementation

2020-02-27 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 247039. serge-sans-paille added a comment. Add a test case that exhibits the overflow in previous implementation + minor nits from @hokein Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75057/new/

Re: r355698 - Re-fix _lrotl/_lrotr to always take Long, no matter the platform.

2020-02-27 Thread Michael Spencer via cfe-commits
On Wed, Feb 26, 2020 at 8:39 PM James Y Knight wrote: > I'm not clear as to what you're saying is broken. > > On MS platforms, long is 32-bit, so either way this function takes a 32bit > value, right? And, Microsoft's docs say this function takes a long. > As per the original commit that

[PATCH] D73967: Implement _ExtInt as an extended int type specifier.

2020-02-27 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked an inline comment as done. erichkeane added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:4020 + + auto *New = new (*this, TypeAlignment) ExtIntType(IsUnsigned, NumBits); + ExtIntTypes.InsertNode(New, InsertPos); keryell wrote: >

[PATCH] D73967: Implement _ExtInt as an extended int type specifier.

2020-02-27 Thread Ronan Keryell via Phabricator via cfe-commits
keryell added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:4020 + + auto *New = new (*this, TypeAlignment) ExtIntType(IsUnsigned, NumBits); + ExtIntTypes.InsertNode(New, InsertPos); Why no just `auto` without a `*` everywhere? CHANGES SINCE LAST

  1   2   3   >