[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

[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

[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: > > >

[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:

[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

[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] 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

[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

[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 > -

[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 ___

[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

[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

[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:

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=rev Log: [Analyzer] Iterator Checker - Forbid decrements past the begin() and increments past the end() of containers Previously, the iterator range checker only

[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: >

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=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 __float128 on

[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

[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

[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

[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

[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:

[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=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 related

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=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_trait`

[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

[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:

[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

[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

[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

[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

[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:

[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

[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

[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( +

[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: > > > >

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=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:

[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

[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] 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

[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

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=rev Log: Extend test for DependentSizedArrayType Use a using declaration to force the type to appear in the -ast-dump output. Modified:

[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

[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,

[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

[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-...`. > >

[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

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=rev Log: Remove reference to recently removed PTH Documentation. Removed in r348266 Change-Id: Icff0212f57c42ca84ec174ddd4366ae63a7923fa Modified:

[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

[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

[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 && +

[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

[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] 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] 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.

[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] 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

[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] 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:

[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() ==

[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 ___

[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 =

[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

[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

[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() ==

[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

[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,

[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 , Token , const SourceManager ) { + if (T1.getLength() != T2.getLength()) Should this function compare token kinds first?

[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

[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/

[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=rev Log: Fix "array must be initialized with a brace-enclosed initializer" build error. Try to fix clang-bpf-build buildbot. Modified:

[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: > > > > >

[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/

[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] 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

[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

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

[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:

[PATCH] D55133: [CTU] Add statistics

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176655. martong marked an inline comment as done. martong added a comment. - Remove braces Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55133/new/ https://reviews.llvm.org/D55133 Files:

[PATCH] D55257: Inline handling of DependentSizedArrayType

2018-12-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D55257#1318376 , @steveire wrote: > In D55257#1318328 , @aaron.ballman > wrote: > > > > It is necessary to perform all printing before any traversal to child > > > nodes. > > > >

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-12-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1304 +RHSTy = ResultTy; + } + rjmccall wrote: > leonardchan wrote: > > rjmccall wrote: > > > ebevhan wrote: > > > > rjmccall wrote: > >

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

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176660. martong added a comment. - Use rm, mkdir and break long RUN lines Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55129/new/ https://reviews.llvm.org/D55129 Files: test/Analysis/ctu-main.cpp Index:

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

2018-12-04 Thread Pierre van Houtryve via Phabricator via cfe-commits
Pierre-vh updated this revision to Diff 176661. Pierre-vh added a comment. Hello again! I updated the diff and completely removed the outer if. Please let me know what you think! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55226/new/ https://reviews.llvm.org/D55226 Files:

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

2018-12-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. We should probably prefer `%clang_analyze_cc1` to `%clang_cc1 -analyze` here too. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55134/new/ https://reviews.llvm.org/D55134 ___ cfe-commits

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

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-12-04 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D55067#1313419 , @rjmccall wrote: > I understand that it's copied into a properly-aligned local variable, but if > it affects how the function is called, that's also part of the ABI, and it > should be taken from the C

[PATCH] D55039: [sema] Warn of mangling change if function parameters are noexcept.

2018-12-04 Thread Matt Davis via Phabricator via cfe-commits
mattd marked an inline comment as done. mattd added inline comments. Comment at: lib/Sema/SemaDecl.cpp:10266 auto *FPT = NewFD->getType()->castAs(); - bool AnyNoexcept = HasNoexcept(FPT->getReturnType()); - for (QualType T : FPT->param_types()) -

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @rsmith ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53655/new/ https://reviews.llvm.org/D53655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[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 176672. martong added a comment. - Forgot to rename err_ctu_incompat_triple -> warn_ctu_incompat_triple Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55134/new/ https://reviews.llvm.org/D55134 Files:

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-12-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D55067#1318810 , @arsenm wrote: > In D55067#1313419 , @rjmccall wrote: > > > I understand that it's copied into a properly-aligned local variable, but > > if it affects how the

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

2018-12-04 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM with minor revisions. Comment at: lib/Sema/SemaType.cpp:7206 + // Do not deduce address spaces in templates. + T->isDependentType()) return;

[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

[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

[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:

[PATCH] D55280: [CTU] Remove redundant error check

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: xazax.hun, a_sidorin, Szelethus, balazske. Herald added subscribers: cfe-commits, gamesh411, dkrupp, rnkovacs. In loadExternalAST we normally return with either an error or with a valid ASTUnit pointer which should not be a nullptr. However,

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

2018-12-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D53238#1318349 , @martell wrote: > 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. This

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

2018-12-04 Thread Artem Belevich via Phabricator via cfe-commits
tra requested changes to this revision. tra added a comment. This revision now requires changes to proceed. I'm not sure that's something that needs to be fixed in clang. IIUIC, Debian has added a shim that pretends to be a monolithic CUDA install:

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/abseil-duration-subtraction.rst:7 +Checks for cases where subtraction should be performed in the +``absl::Duration`` domain. When subtracting two values, and the first one is +known to be a conversion from

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

2018-12-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. Thanks! LGTM! :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55135/new/ https://reviews.llvm.org/D55135

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

2018-12-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/CrossTU/CrossTranslationUnit.cpp:212 +// diagnostics. +Context.getDiagnostics().Report(diag::err_ctu_incompat_triple) +<< Unit->getMainFileName() << TripleTo.str() << TripleFrom.str(); martong

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-12-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *ping* @rsmith Any more comments on this patch or the one before it (https://reviews.llvm.org/D54014)? That one has the fix for pushing and popping another ExprEvalContext before acting on a function body in this patch. Repository: rC Clang CHANGES SINCE LAST

  1   2   3   >