r348239 - [WIP][Sema] Improve static_assert diagnostics for type traits.

2018-12-04 Thread Clement Courbet via cfe-commits
Author: courbet Date: Mon Dec 3 23:59:57 2018 New Revision: 348239 URL: http://llvm.org/viewvc/llvm-project?rev=348239&view=rev Log: [WIP][Sema] Improve static_assert diagnostics for type traits. Summary: In our codebase, `static_assert(std::some_type_trait::value, "msg")` (where `some_type_trai

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-12-04 Thread Clement Courbet via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348239: [WIP][Sema] Improve static_assert diagnostics for type traits. (authored by courbet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION htt

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-12-04 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 176554. Rakete added a comment. Rebase + friendly ping :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Pa

[PATCH] D55006: [clang] - Simplify tools::SplitDebugName

2018-12-04 Thread George Rimar via Phabricator via cfe-commits
grimar added a comment. In D55006#1316985 , @JonasToth wrote: > from my side no objections, mailing list did not react AFAIK (just in case > your waiting for me until you recommit). David requested the test case, I added it and now waiting for his appro

[PATCH] D55255: Fix a false positive in misplaced-widening-cast

2018-12-04 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp created this revision. dkrupp added reviewers: JonasToth, alexfh. dkrupp added a project: clang-tools-extra. Herald added subscribers: cfe-commits, gamesh411, Szelethus, rnkovacs. bugprone-misplaced-widening-cast check used to give a false warning to the following example. enum Day

[PATCH] D55097: [constexpr][c++2a] Try-catch blocks in constexpr functions

2018-12-04 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 176559. bruno added a comment. Address @rsmith comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55097/new/ https://reviews.llvm.org/D55097 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/AST/ExprConstant.cpp lib/Sema/SemaDeclCXX.cpp

[PATCH] D53866: [Preamble] Fix preamble for circular #includes

2018-12-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: include/clang/Lex/Preprocessor.h:391 } PreambleConditionalStack; + bool PreambleGenerationFailed = false; There's a mechanism to handle preamble with errors, see `PreprocessorOpts::AllowPCHWithCompilerErrors

[PATCH] D55062: [clangd] Partition include graph on auto-index.

2018-12-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Comment at: unittests/clangd/BackgroundIndexTests.cpp:204 + EXPECT_EQ(ShardSource->Sources->size(), 2U); // A.cc, A.h + EXPECT_THAT( + ShardSource->

[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

2018-12-04 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan abandoned this revision. yvvan added a comment. @zturner The fact that so many call-sites decide what to do is pretty error-prone. There was already at least one issue when this flag was not properly set by some of the call-sites. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D549

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-04 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc requested changes to this revision. chandlerc added a comment. This revision now requires changes to proceed. I think this should be `internal-driver-option` and the text updated? I don't think these are necessarily experimental, they're internals of the compiler implementation, and no

[PATCH] D55256: [clangd] Support clang-tidy configuration in clangd.

2018-12-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, javed.absar. Clangd will support a minimal set of clang-tidy configurations - respect .clang-tidy for each file - add a `clang-tidy-checks` CLI option tha

r348241 - Extend test for DependentSizedArrayType

2018-12-04 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Tue Dec 4 01:53:36 2018 New Revision: 348241 URL: http://llvm.org/viewvc/llvm-project?rev=348241&view=rev Log: Extend test for DependentSizedArrayType Use a using declaration to force the type to appear in the -ast-dump output. Modified: cfe/trunk/test/AST/ast-dump-ar

[PATCH] D55257: Inline handling of DependentSizedArrayType

2018-12-04 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. Herald added a subscriber: cfe-commits. Re-order handling of getElementType and getBracketsRange. It is necessary to perform all printing before any traversal to child nodes. This causes no change in the output of ast-dump-array.cpp due to the way child nodes are p

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-04 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: test/Sema/format-strings-bitfield-promotion.c:1 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s + aaron.ballman wrote: > ebevhan wrote: > > ebevhan wrote: > > > aaron.ballman wrote: > > > > aa

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-04 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 176571. ebevhan added a comment. Added testing for C++ and different sizes of `int` and `long`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 Files: lib/Sema/SemaChecking.cpp test/Sema/format-strings-b

r348244 - [Analyzer] Iterator Checkers - Use the region of the topmost base class for iterators stored in a region

2018-12-04 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Tue Dec 4 02:22:28 2018 New Revision: 348244 URL: http://llvm.org/viewvc/llvm-project?rev=348244&view=rev Log: [Analyzer] Iterator Checkers - Use the region of the topmost base class for iterators stored in a region If an iterator is represented by a derived C++

[PATCH] D54466: [Analyzer] Iterator Checkers - Use the region of the topmost base class for iterators stored in a region

2018-12-04 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348244: [Analyzer] Iterator Checkers - Use the region of the topmost base class for… (authored by baloghadamsoftware, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: ht

r348245 - [Analyzer] Iterator Checker - Forbid decrements past the begin() and increments past the end() of containers

2018-12-04 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Tue Dec 4 02:27:27 2018 New Revision: 348245 URL: http://llvm.org/viewvc/llvm-project?rev=348245&view=rev Log: [Analyzer] Iterator Checker - Forbid decrements past the begin() and increments past the end() of containers Previously, the iterator range checker onl

[PATCH] D53812: [Analyzer] Iterator Checker - Forbid decrements past the begin() and increments past the end() of containers

2018-12-04 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348245: [Analyzer] Iterator Checker - Forbid decrements past the begin() and increments… (authored by baloghadamsoftware, committed by ). Changed prior to commit: https://reviews.llvm.org/D53812?vs=1763

[PATCH] D55260: [CodeComplete] Fix a crash in access checks of inner classes

2018-12-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: kadircet. The crash was introduced in r348135. Repository: rC Clang https://reviews.llvm.org/D55260 Files: lib/Sema/SemaCodeComplete.cpp test/CodeCompletion/accessibility.cpp Index: test/CodeCompletion/accessibility.c

[PATCH] D55135: [CTU][Analyzer]Add DisplayCTUProgress analyzer switch

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176581. martong marked 4 inline comments as done. martong added a comment. - Rename AnalyzerDisplayCtuProgress to Opts.AnalyzerDisplayCTUProgress - Change the CTU progress message Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D55135: [CTU][Analyzer]Add DisplayCTUProgress analyzer switch

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > Also, almost everywhere CTU is capitalized, so I guess it should be in the > field name too. Ok, I renamed it to have CTU all capitalized. Comment at: lib/CrossTU/CrossTranslationUnit.cpp:239 + if (DisplayCTUProgress) { +llvm::errs() <<

[PATCH] D55057: [Headers] Make max_align_t match GCC's implementation.

2018-12-04 Thread Ulrich Weigand via Phabricator via cfe-commits
uweigand added inline comments. Comment at: lib/Headers/__stddef_max_align_t.h:40 __attribute__((__aligned__(__alignof__(long double; +#ifdef __i386__ + __float128 __clang_max_align_nonce3 jyknight wrote: > EricWF wrote: > > uweigand wrote: > > > jykn

[PATCH] D55135: [CTU][Analyzer]Add DisplayCTUProgress analyzer switch

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176582. martong added a comment. - Change the CTU progress message in the test too Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55135/new/ https://reviews.llvm.org/D55135 Files: include/clang/CrossTU/CrossTranslationUnit.

r348247 - [SystemZ] Do not support __float128

2018-12-04 Thread Ulrich Weigand via cfe-commits
Author: uweigand Date: Tue Dec 4 02:51:36 2018 New Revision: 348247 URL: http://llvm.org/viewvc/llvm-project?rev=348247&view=rev Log: [SystemZ] Do not support __float128 As of rev. 268898, clang supports __float128 on SystemZ. This seems to have been in error. GCC has never supported __float12

[PATCH] D55057: [Headers] Make max_align_t match GCC's implementation.

2018-12-04 Thread Ulrich Weigand via Phabricator via cfe-commits
uweigand marked an inline comment as done. uweigand added inline comments. Comment at: lib/Headers/__stddef_max_align_t.h:40 __attribute__((__aligned__(__alignof__(long double; +#ifdef __i386__ + __float128 __clang_max_align_nonce3 uweigand wrote: > j

[PATCH] D55057: [Headers] Make max_align_t match GCC's implementation.

2018-12-04 Thread Ulrich Weigand via Phabricator via cfe-commits
uweigand added a comment. As an aside, it would be nice if we had a test case that verifies the explicit values of alignof(max_align_t) on all supported platforms. This is an ABI property that should never change. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D5

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176584. martong added a comment. - Break long RUN lines Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55134/new/ https://reviews.llvm.org/D55134 Files: include/clang/Basic/DiagnosticCrossTUKinds.td include/clang/CrossTU/

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-12-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 176588. hokein marked 6 inline comments as done. hokein added a comment. Address review comments - remove Unknown enum type - make TUState only accessed by the worker thread. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-12-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/TUScheduler.cpp:268 + /// Status of the TU. + TUStatus Status; /* GUARDED_BY(DiagMu) */ }; ilya-biryukov wrote: > hokein wrote: > > ilya-biryukov wrote: > > > Is `Status` actually ever read from multiple threads

[PATCH] D55135: [CTU][Analyzer]Add DisplayCTUProgress analyzer switch

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: test/Analysis/ctu-main.cpp:6 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config experimental-enable-naive-ctu-analysis=true -analyzer-config ctu-dir=%T/ct

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-12-04 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. > A quick, tangentially related idea: Would it be useful to implement multiline > nolint sections (e.g. `//BEGINNOLINT` – `//ENDNOLINT` or something similar)? > This would be helpful for using clang-tidy on projects that contain some > automatically generated fragment

[PATCH] D55135: [CTU][Analyzer]Add DisplayCTUProgress analyzer switch

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176590. martong marked an inline comment as done. martong added a comment. - Break long RUN line Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55135/new/ https://reviews.llvm.org/D55135 Files: include/clang/CrossTU/CrossTr

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-04 Thread Romanov Vlad via Phabricator via cfe-commits
romanovvlad created this revision. romanovvlad added reviewers: rjmccall, yaxunl, Anastasia. Herald added a subscriber: kosarev. When addresspacecast is generated resulting pointer should preserve TBAA information from original value. Repository: rC Clang https://reviews.llvm.org/D55262 Fil

[PATCH] D55256: [clangd] Support clang-tidy configuration in clangd.

2018-12-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 176591. hokein added a comment. Minor cleanup Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55256/new/ https://reviews.llvm.org/D55256 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/Clan

[PATCH] D55255: Fix a false positive in misplaced-widening-cast

2018-12-04 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 in general, but a few comments re: test. Comment at: test/clang-tidy/bugprone-misplaced-widening-cast-explicit-only.cpp:67-73 +MON = 0, +TUE = 1, +WED = 2, +THR = 3, +FRI

[PATCH] D55260: [CodeComplete] Fix a crash in access checks of inner classes

2018-12-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:1348 +} +return Results.getSema().IsSimplyAccessible(ND, Cls, BaseType); + } I suppose `Cls` should be `NamingClass` Repository: rC Clang CHANGES SINCE LAST ACTION https://r

[PATCH] D55260: [CodeComplete] Fix a crash in access checks of inner classes

2018-12-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 176593. ilya-biryukov added a comment. - Actually use the computed NamingClass Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55260/new/ https://reviews.llvm.org/D55260 Files: lib/Sema/SemaCodeComplete.cpp test/Code

[PATCH] D55062: [clangd] Partition include graph on auto-index.

2018-12-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 176594. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55062/new/ https://reviews.llvm.org/D55062 Files: clangd/Headers.

[clang-tools-extra] r348252 - [clangd] Partition include graph on auto-index.

2018-12-04 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Tue Dec 4 03:31:57 2018 New Revision: 348252 URL: http://llvm.org/viewvc/llvm-project?rev=348252&view=rev Log: [clangd] Partition include graph on auto-index. Summary: Partitions include graphs in auto-index so that each shards contains only part of the include graph relat

[PATCH] D55062: [clangd] Partition include graph on auto-index.

2018-12-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348252: [clangd] Partition include graph on auto-index. (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2018-12-04 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D54945#1316251 , @MarinaKalashina wrote: > Fixes: > > - empty line before 'Standalone tool' > - table columns with '+/-' aligned > - line width limited to 80 (except for the table) > > Additions: > - clang-tidy-vs plugin > - C

[PATCH] D55260: [CodeComplete] Fix a crash in access checks of inner classes

2018-12-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. I believe also we need another test case where `Cls` and `NamingClass` are different. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55260/new/ https://reviews.llvm.org/D55260 ___ cfe-commit

[PATCH] D54905: [AddressSanitizer] Add flag to disable linking with CXX runtime

2018-12-04 Thread Eugene Leviant via Phabricator via cfe-commits
evgeny777 added a comment. > ASan uses -Wl,-whole-archive to pull all its members Yep, I forgot about this. Looks like weak new/delete will do the job then. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54905/new/ https://reviews.llvm.org/D54905 _

[PATCH] D54401: [analyzer] Prefer returns values to out-params in CheckerRegistry.cpp

2018-12-04 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D54401#1315354 , @NoQ wrote: > The code looks good, but i vaguely remember that we might accidentally break > clang-tidy integration that uses this API to enable/disable specific checkers > via `-checks=-analyzer-...`. > > *sum

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2018-12-04 Thread Marina Kalashina via Phabricator via cfe-commits
MarinaKalashina marked 4 inline comments as done. MarinaKalashina added a comment. In D54945#1318278 , @alexfh wrote: > In D54945#1316251 , @MarinaKalashina > wrote: > > > Fixes: > > > > - empty line before 'Standa

[PATCH] D55125: [clang-tidy] Fix a false positive in misc-redundant-expression check

2018-12-04 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:601 +static bool compareToks(Token &T1, Token &T2, const SourceManager &SM) { + if (T1.getLength() != T2.getLength()) Should this function compare token kinds first? =

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-04 Thread Mikael Nilsson via Phabricator via cfe-commits
mikael updated this revision to Diff 176596. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54862/new/ https://reviews.llvm.org/D54862 Files: include/clang/AST/CanonicalType.h include/clang/AST/DeclCXX.h include/clang/AST/Type.h lib/AST/ASTContext.cpp lib/AST/ASTDumper.cpp lib

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2018-12-04 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D54945#1318283 , @MarinaKalashina wrote: > In D54945#1318278 , @alexfh wrote: > > > In D54945#1316251 , > > @MarinaKalashina wrote: > > > > > Fix

[PATCH] D55226: [Fix][StaticAnalyzer] Bug 39792 - False positive on strcpy targeting struct member

2018-12-04 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. Please add more context using the `-U` option, like `git diff -U9 ...`. In D55226#1317119 , @Pierre-vh wrote: > Sadly I'm not experienced enough to think of every case that should pass this > check, so I limited myself to just fi

[PATCH] D55135: [CTU][Analyzer]Add DisplayCTUProgress analyzer switch

2018-12-04 Thread Kristüf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: test/Analysis/ctu-main.cpp:6 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config experimental-enable-naive-ctu-analysis=true -analyzer-config ctu-dir=%T/

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2018-12-04 Thread Marina Kalashina via Phabricator via cfe-commits
MarinaKalashina updated this revision to Diff 176601. MarinaKalashina added a comment. Full-context patch for the changes introduced in the previous commit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54945/new/ https://reviews.llvm.org/D54945 Files: docs/clang-tidy/index.rst Ind

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:4816 +// OpenCLCPlusPlus: A class member function has an address space. +if (state.getSema().getLangOpts().OpenCLCPlusPlus && +state.getDeclarator().getContext() == Can

[PATCH] D55255: Fix a false positive in misplaced-widening-cast

2018-12-04 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp updated this revision to Diff 176604. dkrupp added a comment. Comments addressed. Please commit if looks good, I don't have commit rights. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55255/new/ https://reviews.llvm.org/D55255 Files: clang-tidy/bugprone/MisplacedWiden

[PATCH] D55257: Inline handling of DependentSizedArrayType

2018-12-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > It is necessary to perform all printing before any traversal to child nodes. This piqued my interest -- is `VisitFunctionDecl()` then incorrect because it streams output, then dumps parameter children, then dumps more output, then dumps override children? Or do

[PATCH] D55127: [OpenCL] Diagnose conflicting address spaces between template definition and its instantiation

2018-12-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > Can you explain why the changes to `TreeTransform` are required? When address spaces of template parameter and argument are given explicitly they might mismatch. For example, `foo1` (in the test) is instantiated with `__local int` but the template parameter of `foo

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-04 Thread Mikael Nilsson via Phabricator via cfe-commits
mikael marked an inline comment as done. mikael added inline comments. Comment at: lib/Sema/SemaType.cpp:4816 +// OpenCLCPlusPlus: A class member function has an address space. +if (state.getSema().getLangOpts().OpenCLCPlusPlus && +state.getDeclarator(

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2018-12-04 Thread Marina Kalashina via Phabricator via cfe-commits
MarinaKalashina added a comment. @alexfh Thanks a lot for your patience and help. I've made another revision, now with the diff made by 'git show HEAD -U99' to have the full context availlable. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54945/new/ https://reviews.llvm.org/D5494

[PATCH] D37726: clang: alias -static-{libstdc++, libgcc} for LLVM variants

2018-12-04 Thread Martell Malone via Phabricator via cfe-commits
martell abandoned this revision. martell added a comment. Dropping in favour of D53238 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D37726/new/ https://reviews.llvm.org/D37726 ___ cfe

[PATCH] D53238: [Driver] Add -static-{rtlib, stdlib} and make -static-{libgcc, libstdc++} their aliases

2018-12-04 Thread Martell Malone via Phabricator via cfe-commits
martell added a comment. Seems like a better solution than what I had in D37726 . I'm not sully sure on the naming so I think someone else should also sign off on this. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53238/new/ ht

[PATCH] D53238: [Driver] Add -static-{rtlib, stdlib} and make -static-{libgcc, libstdc++} their aliases

2018-12-04 Thread Martell Malone via Phabricator via cfe-commits
martell added a comment. Also, Sorry for the long time to reply, I don't LLVM often enough :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53238/new/ https://reviews.llvm.org/D53238 ___ cfe-commits mailing list cfe

[PATCH] D55007: [Analyzer] Constraint Manager - Calculate Effective Range for Differences

2018-12-04 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. My original idea was that once we ony store either A - B or B - A. Thus if we already have A - B stored then do not store range for B - A but negate both the difference and the range. I can think on two ways to implement this: 1. Create a separate function e.

[PATCH] D55257: Inline handling of DependentSizedArrayType

2018-12-04 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D55257#1318328 , @aaron.ballman wrote: > > It is necessary to perform all printing before any traversal to child nodes. > > This piqued my interest -- is `VisitFunctionDecl()` then incorrect because it > streams output, then

[PATCH] D55135: [CTU][Analyzer]Add DisplayCTUProgress analyzer switch

2018-12-04 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. The code not directly related to adding the actual flag looks great, but this still should be an `-analyzer-config` option. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D55129: [CTU] Eliminate race condition in CTU lit tests

2018-12-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. After the review comment is resolved, the rest LGTM! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55129/new/ https://reviews.llvm.org/D55129

[PATCH] D55132: [CTU] Add asserts to protect invariants

2018-12-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added inline comments. Comment at: lib/CrossTU/CrossTranslationUnit.cpp:249 CrossTranslationUnitContext::importDefinition(const FunctionDecl *FD) { + assert(FD->hasBody() && "Functions to be imported should have body."); + ---

[PATCH] D50256: [Analyzer] [WIP] Basic support for multiplication and division in the constraint manager (for == and != only)

2018-12-04 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked 2 inline comments as done. baloghadamsoftware added a comment. Thank you for reviewing this patch! Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:576-597 + RangeSet New = getRange(St, Sym); + for (llvm::APSInt I = AdjustmentType.getZe

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:4816 +// OpenCLCPlusPlus: A class member function has an address space. +if (state.getSema().getLangOpts().OpenCLCPlusPlus && +state.getDeclarator().getContext() == mik

[clang-tools-extra] r348262 - Fix "array must be initialized with a brace-enclosed initializer" build error.

2018-12-04 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Tue Dec 4 06:07:29 2018 New Revision: 348262 URL: http://llvm.org/viewvc/llvm-project?rev=348262&view=rev Log: Fix "array must be initialized with a brace-enclosed initializer" build error. Try to fix clang-bpf-build buildbot. Modified: clang-tools-extra/trunk/clangd/H

[PATCH] D55131: [CTU] Add more lit tests and better error handling

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176619. martong marked 8 inline comments as done. martong added a comment. - Break long RUN lines - Clang format the test files - Use consistent naming style - Remove braces Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55131/

[PATCH] D55131: [CTU] Add more lit tests and better error handling

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: test/Analysis/Inputs/ctu-other.c:6 + int b; +} foobar; + a_sidorin wrote: > Please use a consistent naming style across the file. There are names > starting with capital, having underscores and written like this. Ok, I

[PATCH] D55131: [CTU] Add more lit tests and better error handling

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > Also, maybe it'd be worth making a CTU directory under test/Analysis for CTU > related test files. It is a good point, but I'd do that in the future once we have even more ctu related test files. Perhaps together with a new check-clang-analysis-ctu build target. Re

r348268 - Remove reference to recently removed PTH Documentation.

2018-12-04 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Tue Dec 4 06:46:25 2018 New Revision: 348268 URL: http://llvm.org/viewvc/llvm-project?rev=348268&view=rev Log: Remove reference to recently removed PTH Documentation. Removed in r348266 Change-Id: Icff0212f57c42ca84ec174ddd4366ae63a7923fa Modified: cfe/trunk/docs/i

[PATCH] D55133: [CTU] Add statistics

2018-12-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. The code LGTM! I am not good at wordsmithing, but if the descriptions of the statistics are not clear enough, I agree that they should be rephrased. Repository: rC Clang CHANGES SINC

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-12-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun requested changes to this revision. xazax.hun added inline comments. This revision now requires changes to proceed. Comment at: include/clang/Basic/DiagnosticCrossTUKinds.td:19 + +def err_ctu_incompat_triple : Error< + "imported AST from '%0' had been generated for a d

r348271 - [OPENMP][NVPTX]Mark __kmpc_barrier functions as convergent.

2018-12-04 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Tue Dec 4 07:03:25 2018 New Revision: 348271 URL: http://llvm.org/viewvc/llvm-project?rev=348271&view=rev Log: [OPENMP][NVPTX]Mark __kmpc_barrier functions as convergent. __kmpc_barrier runtime functions must be marked as convergent to prevent some dangerous optimizations.

[PATCH] D55135: [CTU][Analyzer]Add DisplayCTUProgress analyzer switch

2018-12-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Having an analyzer config option makes sense. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55135/new/ https://reviews.llvm.org/D55135 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D55270: [Sema] Further improvements to to static_assert diagnostics.

2018-12-04 Thread Clement Courbet via Phabricator via cfe-commits
courbet created this revision. courbet added reviewers: aaron.ballman, Quuxplusone. We're now handling cases like `static_assert(!expr)` and static_assert(!(expr))`. Repository: rC Clang https://reviews.llvm.org/D55270 Files: lib/Sema/SemaTemplate.cpp test/SemaCXX/static-assert.cpp Ind

[PATCH] D55269: [CUDA][OpenMP] Fix nvidia-cuda-toolkit detection on Debian/Ubuntu

2018-12-04 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny created this revision. jdenny added reviewers: ABataev, Hahnfeld, tra, sylvestre.ledru. Herald added a subscriber: guansong. D40453 (r319317) was meant to handle nvidia-cuda-toolkit's split CUDA installation in Debian. This patch addresses two issues left

r348272 - [OPENMP][NVPTX]Fixed emission of the critical region.

2018-12-04 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Tue Dec 4 07:25:01 2018 New Revision: 348272 URL: http://llvm.org/viewvc/llvm-project?rev=348272&view=rev Log: [OPENMP][NVPTX]Fixed emission of the critical region. Critical regions in NVPTX are the constructs, which, generally speaking, are not supported by the NVPTX targe

[PATCH] D53701: [Analyzer] Record and process comparison of symbols instead of iterator positions in interator checkers

2018-12-04 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In D53701#1315242 , @NoQ wrote: > I think it's worth a try to do a total evalCall at first, and then disable > evalCall (together with the attempt to model the iterator position) in an > incrementally growing blacklist

Re: r348131 - [AST] Fix an uninitialized bug in the bits of FunctionDecl

2018-12-04 Thread Bruno Ricci via cfe-commits
There is two reasons for this change: 1.) The first one is that the bit FunctionDeclBits.IsCopyDeductionCandidate is only used by CXXDeductionGuideDecl and so there is no getter/setter for it in FunctionDecl, and it would not make sense to add one. This is a legacy of when these bits w

r348276 - [AST][NFC] Make ArrayTypeTraitExpr non polymorphic

2018-12-04 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Tue Dec 4 08:01:24 2018 New Revision: 348276 URL: http://llvm.org/viewvc/llvm-project?rev=348276&view=rev Log: [AST][NFC] Make ArrayTypeTraitExpr non polymorphic ArrayTypeTraitExpr is the only expression class which is polymorphic. As far as I can tell this is completely

[PATCH] D55221: [AST] Make ArrayTypeTraitExpr non-polymorphic.

2018-12-04 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348276: [AST][NFC] Make ArrayTypeTraitExpr non polymorphic (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D55221?vs=1

r348278 - [AST] Assert that no statement/expression class is polymorphic

2018-12-04 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Tue Dec 4 08:04:19 2018 New Revision: 348278 URL: http://llvm.org/viewvc/llvm-project?rev=348278&view=rev Log: [AST] Assert that no statement/expression class is polymorphic Add a static_assert checking that no statement/expression class is polymorphic. People should use

[PATCH] D55222: [AST] Assert that no statement/expression class is polymorphic

2018-12-04 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348278: [AST] Assert that no statement/expression class is polymorphic (authored by brunoricci, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55222/new/ ht

[PATCH] D55269: [CUDA][OpenMP] Fix nvidia-cuda-toolkit detection on Debian/Ubuntu

2018-12-04 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. Ah, this packaging style is a never ending source of fun... Adding `isUbuntu()` seems fine to solve the first issue. For the second point I'd instead propose to fix `FindCuda.cmake`: It's wrong to report `/usr` if the shim tree is in `/usr/lib/cuda`. @sylvestre.ledru w

r348280 - Revert "Avoid emitting redundant or unusable directories in DIFile metadata entries."

2018-12-04 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Tue Dec 4 08:30:45 2018 New Revision: 348280 URL: http://llvm.org/viewvc/llvm-project?rev=348280&view=rev Log: Revert "Avoid emitting redundant or unusable directories in DIFile metadata entries." This reverts commit r348154 and follow-up commits r348211 and r3248213. Re

[PATCH] D55275: [clangd] Dont provide locations for non-existent files.

2018-12-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. We were getting assertion errors when we had bad file names, instead we should skip those. Repository: rCTE Clang Tools Extra https://r

Re: r348154 - Avoid emitting redundant or unusable directories in DIFile metadata entries.

2018-12-04 Thread Ilya Biryukov via cfe-commits
Hi! I had to revert the fix (r348203) in r348280 as this broke our integrate. Also reverted the original change to avoid having compiler-rt in a broken state. Sorry for the inconvenience, see the r348203 thread for more details. On Tue, Dec 4, 2018 at 12:14 AM Adrian Prantl via cfe-commits < cfe-

r348281 - [AST] Assert that no type class is polymorphic

2018-12-04 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Tue Dec 4 08:36:28 2018 New Revision: 348281 URL: http://llvm.org/viewvc/llvm-project?rev=348281&view=rev Log: [AST] Assert that no type class is polymorphic Add a static_assert checking that no type class is polymorphic. People should use LLVM style RTTI instead. Diffe

[PATCH] D55225: [AST] Assert that no type class is polymorphic

2018-12-04 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348281: [AST] Assert that no type class is polymorphic (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D55225?vs=17641

[PATCH] D55006: [clang] - Simplify tools::SplitDebugName

2018-12-04 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added subscribers: labath, klimek. dblaikie added a comment. This revision is now accepted and ready to land. Looks good to me - tagging @labath @klimek here in case they have some further context on whether this is the right place for the test. But I'm f

[PATCH] D55135: [CTU][Analyzer]Add DisplayCTUProgress analyzer switch

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176653. martong added a comment. - Use clang_analyze_cc1 - Change to be an analyzer config option Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55135/new/ https://reviews.llvm.org/D55135 Files: include/clang/CrossTU/CrossT

[PATCH] D55135: [CTU][Analyzer]Add DisplayCTUProgress analyzer switch

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > should be an -analyzer-config option. Ok, just changed it to be. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55135/new/ https://reviews.llvm.org/D55135 ___ cfe-commits mailing list cfe-c

Re: r348131 - [AST] Fix an uninitialized bug in the bits of FunctionDecl

2018-12-04 Thread David Blaikie via cfe-commits
Ah, thanks for the explanation! No worries about pre-commit review or anything - this is what post-commit review is :) Only note for the future is that it might be worth mentioning in the body of the commit message (title/first line was fine) so it's clear why this "extra" work is being done. Than

[PATCH] D54592: [CStringChecker] evaluate explicit_bzero

2018-12-04 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. ping @MaskRay my only hope seemingly :-) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54592/new/ https://reviews.llvm.org/D54592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

Re: r348131 - [AST] Fix an uninitialized bug in the bits of FunctionDecl

2018-12-04 Thread Bruno Ricci via cfe-commits
Got it. Thanks for the review! Bruno On 04/12/2018 16:59, David Blaikie wrote: > Ah, thanks for the explanation! No worries about pre-commit review or > anything - this is what post-commit review is :) Only note for the future is > that it might be worth mentioning in the body of the commit mes

[PATCH] D55133: [CTU] Add statistics

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176654. martong added a comment. - Remove NumNoUnit Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55133/new/ https://reviews.llvm.org/D55133 Files: lib/CrossTU/CrossTranslationUnit.cpp Index: lib/CrossTU/CrossTranslation

[PATCH] D55133: [CTU] Add statistics

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > Sorry, but I don't understand the meaning of some options. Could you please > explain what are NumNoUnit and NumNotInOtherTU and what is the difference > between them? Your point is absolutely true. They are the same, I think at some point some time ago they were dif

  1   2   3   >