[PATCH] D55229: [COFF, ARM64] Make -flto-visibility-public-std a driver and cc1 flag

2018-12-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. I wonder why this flag is called -flto-visibility-public-std. It has nothing to do with -flto. While we are at it, does it make sense to rename this flag? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55229/new/

[PATCH] D55229: [COFF, ARM64] Make -flto-visibility-public-std a driver and cc1 flag

2018-12-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rnk, mstorsjo, efriedma, TomTan. Herald added subscribers: dexonsmith, kristof.beyls, inglorion, javed.absar, mehdi_amini. Clang currently imports certain functions (like __imp__CxxThrowException) even when statically linking. Whereas MSVC

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-12-03 Thread Cameron McInally via Phabricator via cfe-commits
cameron.mcinally added inline comments. Comment at: include/llvm/IR/IRBuilder.h:1244 } /// Copy fast-math-flags from an instruction rather than using the builder's I think you can forgo the `else {` in these functions since the if branch returns

[clang-tools-extra] r348176 - Fix compilation failure on Windows.

2018-12-03 Thread Zachary Turner via cfe-commits
Author: zturner Date: Mon Dec 3 11:59:00 2018 New Revision: 348176 URL: http://llvm.org/viewvc/llvm-project?rev=348176=rev Log: Fix compilation failure on Windows. This was introduced earlier but apparently used an incorrect class name so it doesn't compile on Windows. Modified:

[PATCH] D54737: [clang-tidy] Add the abseil-duration-comparison check

2018-12-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. > `int8` ? Did you mean `int8_t` or am I missing somthing ? Your right, but the solution I wrote did actually not work anyway.. I just specialized `std::hash<>` now. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54737/new/

[clang-tools-extra] r348172 - [clang-tidy] Fix unordered_map failure with specializing std::hash<> and remove previous wrong attempt at doing so

2018-12-03 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Mon Dec 3 11:41:04 2018 New Revision: 348172 URL: http://llvm.org/viewvc/llvm-project?rev=348172=rev Log: [clang-tidy] Fix unordered_map failure with specializing std::hash<> and remove previous wrong attempt at doing so Modified:

[PATCH] D54737: [clang-tidy] Add the abseil-duration-comparison check

2018-12-03 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D54737#1317128 , @JonasToth wrote: > I had to revert and recommitted in rCTE348169 > . `std::unordered_map Something, ...>` does not work, as `std::hash` is not specialized for it. >

[PATCH] D54737: [clang-tidy] Add the abseil-duration-comparison check

2018-12-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I had to revert and recommitted in rCTE348169 . `std::unordered_map` does not work, as `std::hash` is not specialized for it. This behaviour seems to work for some compilers, but some not. I had to google myself a bit for the best

[clang-tools-extra] r348169 - [clang-tidy] Recommit: Add the abseil-duration-comparison check

2018-12-03 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Mon Dec 3 11:22:08 2018 New Revision: 348169 URL: http://llvm.org/viewvc/llvm-project?rev=348169=rev Log: [clang-tidy] Recommit: Add the abseil-duration-comparison check Summary: This check finds instances where Duration values are being converted to a numeric value in

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-12-03 Thread Cameron McInally via Phabricator via cfe-commits
cameron.mcinally added a comment. In D53157#1316860 , @uweigand wrote: > In my reading of the standard text, there is no special provision for library > code. This means that in general, calling any library function while running > with nondefault trap

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

2018-12-03 Thread Pierre van Houtryve via Phabricator via cfe-commits
Pierre-vh added a comment. In D55226#1317083 , @george.karpenkov wrote: > Thank you for the fix, but how far can the pattern matching go? Seems easy > enough to think of cases not covered by the above. > In any case, the fix looks good. Hey, Sadly

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

2018-12-03 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. Assuming this patch were to go in as-is (which it probably won't, based on the feedback, but let's just pretend), that would avoid having to explicitly update how many callsites? What I'm wondering is, how hard would it be to just update the call-sites? It looks like

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

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55222/new/ https://reviews.llvm.org/D55222

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:1072 def AllocSize : InheritableAttr { let Spellings = [GCC<"alloc_size">]; + let Subjects = SubjectList<[HasFunctionProto]>; arichardson wrote: > aaron.ballman wrote: > > Does GCC

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

2018-12-03 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 176435. riccibruno added a comment. Forgot a space in the error message Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55222/new/ https://reviews.llvm.org/D55222 Files: lib/AST/Stmt.cpp Index: lib/AST/Stmt.cpp

[clang-tools-extra] r348165 - Revert "[clang-tidy] Add the abseil-duration-comparison check"

2018-12-03 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Mon Dec 3 10:59:27 2018 New Revision: 348165 URL: http://llvm.org/viewvc/llvm-project?rev=348165=rev Log: Revert "[clang-tidy] Add the abseil-duration-comparison check" This commit broke buildbots and needs adjustments. Removed:

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-12-03 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 176432. kpn added a comment. I've changed the patch so that calls to CreateFAdd() et al will give you constrained intrinsics if they are enabled. This required adding functions to enable/disable constrained-as-default plus calls to deal with the rounding mode

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

2018-12-03 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. Thank you for the fix, but how far can the pattern matching go? Seems easy enough to think of cases not covered by the above. In any case, the fix looks good. Repository:

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

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: lib/AST/Type.cpp:299 + static_assert(!std::is_polymorphic::value, \ +#CLASS "Type should not be polymorphic!"); +#include

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

2018-12-03 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked 2 inline comments as done. riccibruno added inline comments. Comment at: lib/AST/Type.cpp:299 + static_assert(!std::is_polymorphic::value, \ +#CLASS "Type should not be polymorphic!"); +#include "clang/AST/TypeNodes.def"

[PATCH] D54737: [clang-tidy] Add the abseil-duration-comparison check

2018-12-03 Thread Jonas Toth via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348161: [clang-tidy] Add the abseil-duration-comparison check (authored by JonasToth, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[clang-tools-extra] r348161 - [clang-tidy] Add the abseil-duration-comparison check

2018-12-03 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Mon Dec 3 10:35:56 2018 New Revision: 348161 URL: http://llvm.org/viewvc/llvm-project?rev=348161=rev Log: [clang-tidy] Add the abseil-duration-comparison check Summary: This check finds instances where Duration values are being converted to a numeric value in a

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

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/AST/Type.cpp:299 + static_assert(!std::is_polymorphic::value, \ +#CLASS "Type should not be polymorphic!"); +#include "clang/AST/TypeNodes.def" This will squish your class name and error text

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

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55221/new/ https://reviews.llvm.org/D55221

[PATCH] D54881: [clang-format] Prevent Clang-Format from editing leading whitespace on lines outside of the format range

2018-12-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Hi russell thank you for the patch! As I am not a clang-format reviewers these are only general things, and Nits anyway ;) Hope the reviewers I added will evaluate better. Comment at: lib/Format/WhitespaceManager.cpp:54 Tok.Decision = (Newlines

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

2018-12-03 Thread Pierre van Houtryve via Phabricator via cfe-commits
Pierre-vh created this revision. Pierre-vh added reviewers: dcoughlin, MaskRay. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, a.sidorin, szepet, baloghadamsoftware. Herald added a reviewer: george.karpenkov. Fix for the bug n°39792: False positive on strcpy targeting

r348156 - Adding tests for -ast-dump; NFC.

2018-12-03 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Mon Dec 3 10:00:31 2018 New Revision: 348156 URL: http://llvm.org/viewvc/llvm-project?rev=348156=rev Log: Adding tests for -ast-dump; NFC. This adds tests for struct and union declarations in C++. Added: cfe/trunk/test/AST/ast-dump-records.cpp Added:

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

2018-12-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. from my side no objections, mailing list did not react AFAIK (just in case your waiting for me until you recommit). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55006/new/ https://reviews.llvm.org/D55006 ___

[PATCH] D55085: Avoid emitting redundant or unusable directories in DIFile metadata entries

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348154: Avoid emitting redundant or unusable directories in DIFile metadata entries. (authored by adrian, committed by ). Changed prior to commit: https://reviews.llvm.org/D55085?vs=176152=176422#toc

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

2018-12-03 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Mon Dec 3 09:55:27 2018 New Revision: 348154 URL: http://llvm.org/viewvc/llvm-project?rev=348154=rev Log: Avoid emitting redundant or unusable directories in DIFile metadata entries. As discussed on llvm-dev recently, Clang currently emits redundant directories in DIFile

[PATCH] D54657: [clang] Do not dump compilation-database entries for -E.

2018-12-03 Thread Tom Roeder via Phabricator via cfe-commits
tmroeder abandoned this revision. tmroeder added a comment. I found a better way to do this in the Linux kernel build. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54657/new/ https://reviews.llvm.org/D54657 ___

[PATCH] D32950: Support C++1z features in `__has_extension`

2018-12-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I don't mind picking it up again, but it won't be until next week. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D32950/new/ https://reviews.llvm.org/D32950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2018-12-03 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > Hah. Do we support CTU for other languages, like ObjC and ObjC++? Can this be > an issue there? I really don't know. We never tried it, our focus is on C and C++ for now. Unfortunately, there is nobody with ObjC/C++ knowledge and (more importantly) with interest to

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

2018-12-03 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Thanks for the review! I have updated the patch according to your comments. Comment at: lib/CrossTU/CrossTranslationUnit.cpp:31 +namespace llvm { +// Same as Triple's equality operator, but we check a field only if that is a_sidorin

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

2018-12-03 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176417. martong marked 13 inline comments as done. martong added a comment. - Address review comments Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55134/new/ https://reviews.llvm.org/D55134 Files:

[PATCH] D55085: Avoid emitting redundant or unusable directories in DIFile metadata entries

2018-12-03 Thread Davide Italiano via Phabricator via cfe-commits
davide accepted this revision. davide added a comment. LGTM, sorry. for the delay. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55085/new/ https://reviews.llvm.org/D55085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D55188: Extract TextChildDumper class

2018-12-03 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: include/clang/AST/ASTDumperUtils.h:96 + +struct TextChildDumper { + raw_ostream steveire wrote: > aaron.ballman wrote: > > I'm not sold on the name for this class. It's a

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

2018-12-03 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: > uweigand wrote: > > jyknight wrote: > > >

[PATCH] D55188: Extract TextChildDumper class

2018-12-03 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 2 inline comments as done. steveire added inline comments. Comment at: include/clang/AST/ASTDumperUtils.h:22 + +namespace ast_dumper { +// Colors used for various parts of the AST dump aaron.ballman wrote: > steveire wrote: > > aaron.ballman

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

2018-12-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In D54757#1316899 , @donat.nagy wrote: > I applied this check to the llvm + clang codebase, and I was surprised to see > that it produced about 600 results (for comparison, the clang-tidy checks > which are enabled by default

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

2018-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 176415. kadircet marked 3 inline comments as done. kadircet added a comment. - Addresss comments - Make sure there are no uninitialized values in IncludeGraphNode. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION

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

2018-12-03 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy marked 2 inline comments as done. donat.nagy added a comment. I applied this check to the llvm + clang codebase, and I was surprised to see that it produced about 600 results (for comparison, the clang-tidy checks which are enabled by default produce approximately 6000 results

r348150 - [Serialization][NFC] Remove pointless "+ 0" in ASTReader

2018-12-03 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Mon Dec 3 08:17:45 2018 New Revision: 348150 URL: http://llvm.org/viewvc/llvm-project?rev=348150=rev Log: [Serialization][NFC] Remove pointless "+ 0" in ASTReader Remove the pointless "+ 0" which I added for some reason when modifying these statement/expression classes

[PATCH] D53768: Add VerboseOutputStream to CompilerInstance

2018-12-03 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. Ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53768/new/ https://reviews.llvm.org/D53768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2018-12-03 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: aaron.ballman. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. Add a `static_assert` checking that no type class is polymorphic. People should use LLVM style RTTI instead. Repository: rC Clang

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-03 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 176413. arichardson added a comment. - address review comments - add test that we can assign between function pointers with and without alloc_size attribute. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55212/new/

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-12-03 Thread Ulrich Weigand via Phabricator via cfe-commits
uweigand added a comment. In D53157#1309743 , @cameron.mcinally wrote: > Digressing a bit, but has anyone given thought to how this implementation > will play out with libraries? When running with traps enabled, libraries must > be compiled for

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2018-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric. Whenever a change happens on a CDB, load shards associated with that CDB before issuing re-index actions. Repository: rCTE Clang Tools Extra

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-03 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson marked 5 inline comments as done. arichardson added inline comments. Comment at: include/clang/Basic/Attr.td:1072 def AllocSize : InheritableAttr { let Spellings = [GCC<"alloc_size">]; + let Subjects = SubjectList<[HasFunctionProto]>;

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

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry for the delays. Not sure about emitting `Queued` on the main thread, see the corresponding comment. Otherwise looks very good. Comment at: clangd/ClangdServer.h:49 + /// Called whenever the file status is updated. + virtual void

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

2018-12-03 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy updated this revision to Diff 176408. donat.nagy added a comment. Minor correction in documentation Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54757/new/ https://reviews.llvm.org/D54757 Files:

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

2018-12-03 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: aaron.ballman. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. Add a `static_assert` checking that no statement/expression class is polymorphic. People should use LLVM style RTTI instead. Repository: rC

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

2018-12-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:605 + return strncmp(SM.getCharacterData(T1.getLocation()), + SM.getCharacterData(T2.getLocation()), T1.getLength()) == 0; +} This operation could overflow

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

2018-12-03 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: aaron.ballman. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. `ArrayTypeTraitExpr` is the only expression class which is polymorphic. As far as I can tell this is completely pointless. Repository: rC

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

2018-12-03 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. Thank you both for the review ! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54903/new/ https://reviews.llvm.org/D54903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2018-12-03 Thread Zachary Turner via cfe-commits
I don’t think we really need this. isn’t Ilya’s solution in the other patch already sufficient? On Mon, Dec 3, 2018 at 7:34 AM Ivan Donchevskii via Phabricator < revi...@reviews.llvm.org> wrote: > yvvan added a comment. > > @ilya-biryukov > > Hm. What about another way around? - We have user

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

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman 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 + ebevhan wrote: > ebevhan wrote: > > aaron.ballman wrote: > > > aaron.ballman wrote: > >

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

2018-12-03 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. @ilya-biryukov Hm. What about another way around? - We have user include paths (-I) and report them to the filesystem. This means that we have specific paths under which nothing can be mmaped and everything else can be. In particular cases we can also report -isystem

[PATCH] D41005: Reuse preamble even if an unsaved file does not exist

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: include/clang/Frontend/ASTUnit.h:581 + unsigned getPreambleCounter() const { return PreambleCounter; } + NIT: `getPreambleCounterForTests()`? This is clearly an internal detail, would try giving it a name that

Re: r348123 - [clang] Do not read from 'test/SemaCXX/Inputs' inside 'test/AST'

2018-12-03 Thread Ilya Biryukov via cfe-commits
No worries, this was easy to fix. It's impossible to catch those in advance, we miss things like that all the time. On Mon, Dec 3, 2018 at 1:19 PM Aaron Ballman wrote: > On Mon, Dec 3, 2018 at 6:29 AM Ilya Biryukov via cfe-commits > wrote: > > > > Author: ibiryukov > > Date: Mon Dec 3

[PATCH] D54881: Prevent Clang-Format from editing leading whitespace on lines outside of the format range

2018-12-03 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc added a comment. Bump! Thanks for your consideration. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54881/new/ https://reviews.llvm.org/D54881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2018-12-03 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc added a comment. Bump! Thanks again for your time. As far as I can tell, it's ready for another round of review! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D40988/new/ https://reviews.llvm.org/D40988 ___ cfe-commits mailing

[PATCH] D55066: [ASan] Minor documentation fix: remove static linking limitation.

2018-12-03 Thread Max Moroz via Phabricator via cfe-commits
Dor1s added a comment. In D55066#1315365 , @eugenis wrote: > Sorry for the delay. > This is wrong, static linking is NOT supported. > You could be confusing it with static linking of asan runtime library to an > executable - that is and has always been

[PATCH] D52984: [analyzer] Checker reviewer's checklist

2018-12-03 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 176403. xazax.hun marked 4 inline comments as done. xazax.hun added a comment. - Addressed further comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52984/new/ https://reviews.llvm.org/D52984 Files: www/analyzer/checker_dev_manual.html

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE348147: [clangd] Avoid memory-mapping files on Windows (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D55139?vs=176382=176401#toc Repository: rCTE Clang

[PATCH] D41005: Reuse preamble even if an unsaved file does not exist

2018-12-03 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Ping. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D41005/new/ https://reviews.llvm.org/D41005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] r348147 - [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Dec 3 07:21:49 2018 New Revision: 348147 URL: http://llvm.org/viewvc/llvm-project?rev=348147=rev Log: [clangd] Avoid memory-mapping files on Windows Summary: Memory-mapping files on Windows leads to them being locked and prevents editors from saving changes to those

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

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54995#1316476 , @yvvan wrote: > I don't think removing the flag is a good idea since I can easily assume > cases when user wants mmap and is ready to encounter locks. In our case it > can be an IDE option which

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

2018-12-03 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Ping. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53866/new/ https://reviews.llvm.org/D53866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: lib/Sema/SemaTemplate.cpp:3055 +// Print a diagnostic for the failing static_assert expression. Defaults to +// pretty-printing the

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

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Everything looks good, just a single important request about testing the included files do not have any edges in the resulting graph Comment at: clangd/index/Background.cpp:79 + + // Since the strings in direct includes are references to the

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

2018-12-03 Thread Clement Courbet via Phabricator via cfe-commits
courbet marked an inline comment as done. courbet added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:3055 +// Print a diagnostic for the failing static_assert expression. Defaults to +// pretty-printing the expression. aaron.ballman wrote: > courbet

[PATCH] D54902: [AST][Sema] Remove CallExpr::setNumArgs

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348145: [AST][Sema] Remove CallExpr::setNumArgs (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

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

2018-12-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked an inline comment as done. 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 + ebevhan wrote: > aaron.ballman wrote: > >

r348145 - [AST][Sema] Remove CallExpr::setNumArgs

2018-12-03 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Mon Dec 3 06:54:03 2018 New Revision: 348145 URL: http://llvm.org/viewvc/llvm-project?rev=348145=rev Log: [AST][Sema] Remove CallExpr::setNumArgs CallExpr::setNumArgs is the only thing that prevents storing the arguments in a trailing array. There is only 3 places in

[PATCH] D54630: Move detection of libc++ include dirs to Driver on MacOS

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54630#1315168 , @arphaman wrote: > So far everything looks fine, but I have to rerun a couple of things due to > infrastructural issues. I should have the final results next Monday. Thanks for the update. Will be

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

2018-12-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 176389. baloghadamsoftware added a comment. One error message slightly updated. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53812/new/ https://reviews.llvm.org/D53812 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp

[PATCH] D54961: [AArch64] Add command-line option for SSBS

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348142: [AArch64] Add command-line option for SSBS (authored by pabbar01, committed by ). Changed prior to commit: https://reviews.llvm.org/D54961?vs=175537=176388#toc Repository: rC Clang CHANGES

r348142 - [AArch64] Add command-line option for SSBS

2018-12-03 Thread Pablo Barrio via cfe-commits
Author: pabbar01 Date: Mon Dec 3 06:40:37 2018 New Revision: 348142 URL: http://llvm.org/viewvc/llvm-project?rev=348142=rev Log: [AArch64] Add command-line option for SSBS Summary: SSBS (Speculative Store Bypass Safe) is only mandatory from 8.5 onwards but is optional from Armv8.0-A. This patch

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

2018-12-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked 2 inline comments as done. 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: > aaron.ballman wrote: > >

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

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:3055 +// Print a diagnostic for the failing static_assert expression. Defaults to +// pretty-printing the expression. courbet wrote: > aaron.ballman wrote: > > Comment is a bit out of

[PATCH] D32950: Support C++1z features in `__has_extension`

2018-12-03 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Hi Eric, I know this is old, but are you interested in reviving this patch? I don't know enough about clang's extensions to LGTM such a patch (updated for the current code), but would really like to have a way to know if extensions are supported. We just now had people

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

2018-12-03 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Also, `AnalyzerOptions.def` was recently clan-formatted, feel free to run it again after the changes you make in it. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55135/new/ https://reviews.llvm.org/D55135

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

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7711-7715 + // It's an integer promotion if the destination type is the promoted + // source type. + return ICE->getCastKind() == CK_IntegralCast && + From->isPromotableIntegerType() && +

[PATCH] D55188: Extract TextChildDumper class

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/ASTDumperUtils.h:22 + +namespace ast_dumper { +// Colors used for various parts of the AST dump steveire wrote: > aaron.ballman wrote: > > I'm not certain this namespace is useful, especially

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:1072 def AllocSize : InheritableAttr { let Spellings = [GCC<"alloc_size">]; + let Subjects = SubjectList<[HasFunctionProto]>; Does GCC support writing `alloc_size` on function

[PATCH] D55188: Extract TextChildDumper class

2018-12-03 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: include/clang/AST/ASTDumperUtils.h:22 + +namespace ast_dumper { +// Colors used for various parts of the AST dump aaron.ballman wrote: > I'm not certain this namespace is

r348139 - [OpenCL][Sema] Improving formatting

2018-12-03 Thread Marco Antognini via cfe-commits
Author: mantognini Date: Mon Dec 3 06:03:49 2018 New Revision: 348139 URL: http://llvm.org/viewvc/llvm-project?rev=348139=rev Log: [OpenCL][Sema] Improving formatting Reformat comment added in r348120 following review https://reviews.llvm.org/D55136. Modified:

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

2018-12-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1304 +RHSTy = ResultTy; + } + rjmccall wrote: > leonardchan wrote: > > rjmccall wrote: > > > ebevhan wrote: > > > > rjmccall wrote: > > > > > Hmm. So adding a signed integer to an

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 176382. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - s/VolatileFSProvider/VolatileFileSystem Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55139/new/

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 176381. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. This revision is now accepted and ready to land. - Keep using memory-mapped files for PCHs - Move once Repository: rCTE Clang Tools Extra CHANGES SINCE LAST

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added inline comments. Comment at: clangd/FSProvider.cpp:33 + return File; +return std::unique_ptr( +new VolatileFile(std::move(std::move(*File; kadircet wrote: > make_unique?

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

2018-12-03 Thread Clement Courbet via Phabricator via cfe-commits
courbet marked an inline comment as done. courbet added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:3055 +// Print a diagnostic for the failing static_assert expression. Defaults to +// pretty-printing the expression. aaron.ballman wrote: > Comment

[PATCH] D55124: [CodeComplete] Cleanup access checking in code completion

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348135: [CodeComplete] Cleanup access checking in code completion (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION

r348135 - [CodeComplete] Cleanup access checking in code completion

2018-12-03 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Dec 3 05:29:17 2018 New Revision: 348135 URL: http://llvm.org/viewvc/llvm-project?rev=348135=rev Log: [CodeComplete] Cleanup access checking in code completion Summary: Also fixes a crash (see the added 'accessibility-crash.cpp' test). Reviewers: ioeric, kadircet

[PATCH] D55191: [clangd] Refine the way of checking a declaration is referenced by the written code.

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. The **idea** of using the AST-based approach here was really nice, it was less expensive and seemed to clearly look at the semantic. I wonder if there's a way to keep it on the AST level, without looking at the source locations. What are the cases we're trying to

[PATCH] D54900: [Sema] Avoid CallExpr::setNumArgs in Sema::BuildCallToObjectOfClassType

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348134: [Sema] Avoid CallExpr::setNumArgs in Sema::BuildCallToObjectOfClassType (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r348134 - [Sema] Avoid CallExpr::setNumArgs in Sema::BuildCallToObjectOfClassType

2018-12-03 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Mon Dec 3 05:23:56 2018 New Revision: 348134 URL: http://llvm.org/viewvc/llvm-project?rev=348134=rev Log: [Sema] Avoid CallExpr::setNumArgs in Sema::BuildCallToObjectOfClassType CallExpr::setNumArgs is the only thing that prevents storing the arguments of a call

[PATCH] D55188: Extract TextChildDumper class

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/ASTDumperUtils.h:22 + +namespace ast_dumper { +// Colors used for various parts of the AST dump I'm not certain this namespace is useful, especially when it gets imported at TU scope in

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

2018-12-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked an inline comment as done. ebevhan added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7711-7715 + // It's an integer promotion if the destination type is the promoted + // source type. + return ICE->getCastKind() == CK_IntegralCast && +

<    1   2   3   >