[PATCH] D66335: [clangd] Added special HighlightingKind for function parameters.

2019-08-19 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369238: [clangd] Added special HighlightingKind for function parameters. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[clang-tools-extra] r369238 - [clangd] Added special HighlightingKind for function parameters.

2019-08-19 Thread Johan Vikstrom via cfe-commits
Author: jvikstrom Date: Mon Aug 19 00:51:39 2019 New Revision: 369238 URL: http://llvm.org/viewvc/llvm-project?rev=369238=rev Log: [clangd] Added special HighlightingKind for function parameters. Summary: This means that function parameters are no longer highlighted as variable.other.cpp but

[PATCH] D66206: [CodeGen] Don't keep stale pointers to LoopInfos

2019-08-19 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Thanks! I don't have commit access, so it would be great if you could commit this for me. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66206/new/ https://reviews.llvm.org/D66206 ___

[PATCH] D66365: [clang-tidy] [readability-convert-member-functions-to-static] ignore functions that hide base class methods

2019-08-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'd like some help in understanding the motivation for this change. The bug report says `But the intention behind this is clearly that there is a member function A::foo which derived classes overwrite.` and I'm not certain that's so clear. It's been my experience

[PATCH] D66423: [analyzer] CastValueChecker: Model isa(), isa_and_nonnull()

2019-08-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added a reviewer: NoQ. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Charusso added a parent revision: D66325: [analyzer]

[PATCH] D66324: clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM

2019-08-19 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 215938. paulkirth edited the summary of this revision. paulkirth added a comment. - Update CodeGenOptions to remove -fmisexpect - Access the LLVMContext directly - Add -line-tables-only for more accurate diagnostics Fixes various issues with tests and

[PATCH] D66324: clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM

2019-08-19 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 215940. paulkirth added a comment. Fix missing context in prior diff CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66324/new/ https://reviews.llvm.org/D66324 Files: clang/include/clang/Basic/DiagnosticFrontendKinds.td

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-19 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: clang/test/Frontend/warning-poison-system-directories.c:12 +// Missing target but included sysroot still causes the warning. +// RUN: %clang -Wpoison-system-directories -I/usr/include --sysroot

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a subscriber: hans. xbolva00 added a comment. >> I think it's too soon to disable any macros. It is hard to say (this was discussed a lot). @tkanis or @hans what do you think? Maybe you could do experiments for us. Comment the code which disables this warning in macros and try

[PATCH] D66364: Diagnose use of _Thread_local as an extension when appropriate

2019-08-19 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D66364#1633981 , @aaron.ballman wrote: > My motivation is for portability. _Thread_local (and all the rest) do not > exist in C99 or earlier (or C++), so having some way to warn users of that is > useful. I agree that we

[PATCH] D66290: [clang] Pragma vectorize_width() implies vectorize(enable)

2019-08-19 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. I think it would be slightly better to split off the change to disable vectorization via `llvm.loop.vectorize.enable=false` instead of width=1. This changes the behaviour from "disable vectorization, but allow interleaving in the vectoriser" to "disable the vectoriser".

[PATCH] D66267: [analyzer] TrackConstraintBRVisitor: Do not track unknown values

2019-08-19 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. In D66267#1632344 , @Charusso wrote: > I would upstream my hotfix of nullability without any tests as the comment > says the intention and also we have plenty of tests of >

[PATCH] D66364: Diagnose use of _Thread_local as an extension when appropriate

2019-08-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: mclow.lists, ldionne. aaron.ballman added a comment. Herald added a subscriber: dexonsmith. In D66364#1635795 , @rsmith wrote: > In D66364#1633981 , @aaron.ballman > wrote: > > > My

[PATCH] D66423: [analyzer] CastValueChecker: Model isa(), isa_and_nonnull()

2019-08-19 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Whoa, the test cases look AMAZING! I admit that I haven't read much of the other code just yet, but I like the results in any case. Comment at: clang/test/Analysis/cast-value-notes.cpp:5-27 namespace llvm { template const X *cast(Y Value);

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-19 Thread Denis Nikitin via Phabricator via cfe-commits
denik added a comment. Manoj, please check updated diff. Comment at: clang/test/Frontend/warning-poison-system-directories.c:12 +// Missing target but included sysroot still causes the warning. +// RUN: %clang -Wpoison-system-directories -I/usr/include --sysroot

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D66397#1635715 , @xbolva00 wrote: > I agree what @tkanis suggested and be silent if RHS is macro as real world > code shows it. Opinions? > > @jfb @aaron.ballman I suspect we can come up with examples where the macro

Re: r369281 - Implement P1668R1

2019-08-19 Thread Leonard Chan via cfe-commits
 Thanks On Mon, Aug 19, 2019 at 11:34 AM Keane, Erich wrote: > Yeah, sorry about that. I fixed it in 369284. > > > > *From:* Leonard Chan [mailto:leonardc...@google.com] > *Sent:* Monday, August 19, 2019 11:33 AM > *To:* Keane, Erich > *Cc:* cfe-commits cfe > *Subject:* Re: r369281 -

[PATCH] D66365: [clang-tidy] [readability-convert-member-functions-to-static] ignore functions that hide base class methods

2019-08-19 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. I struggle myself to fully understand the motivation behind the bug report. This is certainly not code that I would write. So I don't really care about that kind of code and I didn't want to be in the way of other people's way of writing C++. Alternatively, we could ask

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D66397#1635745 , @xbolva00 wrote: > I think it is too soon to jump and disable all macros. We still catch all > motivating cases, it found bugs in Chromium. I think it's too soon to disable any macros. The workaround

[PATCH] D66328: [DebugInfo] Add debug location to dynamic atexit destructor

2019-08-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I'd be happy to take this patch, address the comments, and land it, if you don't want to deal with all the nits. Comment at: test/CodeGen/debug-info-no-location.cpp:1 +// RUN: %clang -cc1 -emit-llvm %s -gcodeview -debug-info-kind=limited -o - | FileCheck

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 215957. xbolva00 added a comment. Do not warn if RHS is macro. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 Files: lib/Sema/SemaExpr.cpp test/SemaCXX/warn-xor-as-pow.cpp Index:

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. I think it is too soon to jump and disable all macros. We still catch all motivating cases, it found bugs in Chromium. Chromium's case makes sense but on the other hand, LHS does not make much sense to be a macro. #define TWO 2 and res = TWO ^ 32? And even for this

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-19 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added reviewers: rtrieu, aaron.ballman. manojgupta added a comment. Thanks, Adding a few more reviewers since I am not very familiar with this part of clang. Please also update the patch description as suggested by @thakis CHANGES SINCE LAST ACTION

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-19 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. In D66397#1635796 , @xbolva00 wrote: > Now, Chromium disabled this warning :( until we “fix” it. If Chromium is willing to make build-system changes to add `-Wno-xor-as-pow`, then surely they should also be willing to make

[PATCH] D66364: Diagnose use of _Thread_local as an extension when appropriate

2019-08-19 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D66364#1635814 , @aaron.ballman wrote: > [ ...] > > Adding some libc++ maintainers to see if they have opinions. > > `__extension__` is one option. Could we get away with push/pop disabling of > the diagnostic? Or perhaps

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-19 Thread Denis Nikitin via Phabricator via cfe-commits
denik updated this revision to Diff 215958. denik marked 3 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52524/new/ https://reviews.llvm.org/D52524 Files: clang/include/clang/Basic/DiagnosticCommonKinds.td clang/include/clang/Basic/DiagnosticGroups.td

RE: r369281 - Implement P1668R1

2019-08-19 Thread Keane, Erich via cfe-commits
Yeah, sorry about that. I fixed it in 369284. From: Leonard Chan [mailto:leonardc...@google.com] Sent: Monday, August 19, 2019 11:33 AM To: Keane, Erich Cc: cfe-commits cfe Subject: Re: r369281 - Implement P1668R1 Not sure if this was caught by upstream bots already, but we're seeing a

Re: r369281 - Implement P1668R1

2019-08-19 Thread Leonard Chan via cfe-commits
Not sure if this was caught by upstream bots already, but we're seeing a failing test ob our x64 bots: ``` FAIL: Clang :: SemaCXX/cxx1z-constexpr-lambdas.cpp (9574 of 15387) TEST 'Clang :: SemaCXX/cxx1z-constexpr-lambdas.cpp' FAILED Script: -- : 'RUN: at

Re: r369217 - [Diagnostics] Diagnose misused xor as pow

2019-08-19 Thread Dávid Bolvanský via cfe-commits
Yes, #define ALPHA_OFFSET 0x3 should turn off the diagnostic. (We skip hex decimals). Dňa 19. 8. 2019 o 20:06 užívateľ Arthur O'Dwyer napísal: >> On Mon, Aug 19, 2019 at 1:53 PM Nico Weber via cfe-commits >> wrote: > >> Hi, >> >> this results in a false positive on webrtc, on this

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> suggested source-code fixit of #define ALPHA_OFFSET 0x3 No, there is a note “replace with 0x2 ^ ALPHA_OFFSET” to silence it. While we can suggest as you wrote: #define ALPHA_OFFSET 0x3 I really dont think it is worth to do. CHANGES SINCE LAST ACTION

[PATCH] D65616: Ignore -fsemantic-interposition/-fno-semantic-interposition flag for gcc compatibility

2019-08-19 Thread Romain Geissler via Phabricator via cfe-commits
Romain-Geissler-1A added a comment. Hi, The only group I know which uses -fsemantic-interposition is the company I work for: Amadeus. Since for now the flag doesn't exist on clang, no we don't know that the future clang implementation doesn't match the gcc one ;) But then we have to wonder if

r369282 - Update cxx_status.html with P1668 status.

2019-08-19 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Mon Aug 19 10:57:27 2019 New Revision: 369282 URL: http://llvm.org/viewvc/llvm-project?rev=369282=rev Log: Update cxx_status.html with P1668 status. Modified: cfe/trunk/www/cxx_status.html Modified: cfe/trunk/www/cxx_status.html URL:

Re: r369217 - [Diagnostics] Diagnose misused xor as pow

2019-08-19 Thread Arthur O'Dwyer via cfe-commits
On Mon, Aug 19, 2019 at 1:53 PM Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi, > > this results in a false positive on webrtc, on this code: > > > https://cs.chromium.org/chromium/src/third_party/libwebp/src/enc/picture_csp_enc.c?q=picture_csp_enc.c=package:chromium=1002 >

r369284 - Fix test where diagnostics changed in P1668 implementation

2019-08-19 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Mon Aug 19 11:08:52 2019 New Revision: 369284 URL: http://llvm.org/viewvc/llvm-project?rev=369284=rev Log: Fix test where diagnostics changed in P1668 implementation Modified: cfe/trunk/test/SemaCXX/cxx1z-constexpr-lambdas.cpp Modified:

[PATCH] D61634: [clang/llvm] Allow efficient implementation of libc's memory functions in C/C++

2019-08-19 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Herald added a reviewer: jdoerfert. I had some time to work on this finally late last week. I decided the most straightforward thing was to implement the necessary interface changes to the TLI analysis to make it require a Function (without any changes yet to how that

[PATCH] D66361: Improve behavior in the case of stack exhaustion.

2019-08-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:14 let Component = "Sema" in { -let CategoryName = "Semantic Issue" in { +def warn_stack_exhausted : Warning< + "stack nearly exhausted; compilation time may suffer, and "

[PATCH] D64741: [clangd] Added highlighting for tokens that are macro arguments.

2019-08-19 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:54 + if (Conflicting.size() > 1) { +Tokens.erase(Tokens.begin() + I, + Tokens.begin() + I + Conflicting.size()); ilya-biryukov wrote:

[clang-tools-extra] r369275 - [clangd] Added highlighting for tokens that are macro arguments.

2019-08-19 Thread Johan Vikstrom via cfe-commits
Author: jvikstrom Date: Mon Aug 19 09:27:49 2019 New Revision: 369275 URL: http://llvm.org/viewvc/llvm-project?rev=369275=rev Log: [clangd] Added highlighting for tokens that are macro arguments. Summary: Adds semantic highlighting for tokens that are a macro argument. Example: ``` D_V(SomeVar);

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a subscriber: jfb. xbolva00 added a comment. I agree what @tkanis suggested and be silent if RHS is macro as real world code shows it. Opinions? @jfb @aaron.ballman Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/

[PATCH] D66328: [DebugInfo] Add debug location to dynamic atexit destructor

2019-08-19 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. "debug-info-no-location.cpp" is an extremely generic name for a very specific case. "debug-info-atexit-stub.cpp" would be better. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66328/new/ https://reviews.llvm.org/D66328

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. From post commit discussion, Nico Weber: 1. Hi, 2. 3. this results in a false positive on webrtc, on this code: 4. 5. https://cs.chromium.org/chromium/src/third_party/libwebp/src/enc/picture_csp_enc.c?q=picture_csp_enc.c=package:chromium=1002 6. 7. The code does this:

[PATCH] D65616: Ignore -fsemantic-interposition/-fno-semantic-interposition flag for gcc compatibility

2019-08-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D65616#1634966 , @serge-sans-paille wrote: > Adding @hfinkel to the thread to confirm it's okay to add this behavior, as > he authored an RFC on the subject (see >

[PATCH] D64741: [clangd] Added highlighting for tokens that are macro arguments.

2019-08-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM from my side (and a few NIT, but up to you whether to apply them) Comment at:

[PATCH] D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode

2019-08-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 215922. Anastasia added a comment. Added small corrections in various parts. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64418/new/ https://reviews.llvm.org/D64418 Files: docs/LanguageExtensions.rst docs/UsersManual.rst Index:

[PATCH] D66294: [Docs][OpenCL] Release 9.0 notes for OpenCL

2019-08-19 Thread Marco Antognini via Phabricator via cfe-commits
mantognini accepted this revision. mantognini added a comment. This revision is now accepted and ready to land. Thanks for addressing my comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66294/new/ https://reviews.llvm.org/D66294 ___

[PATCH] D64741: [clangd] Added highlighting for tokens that are macro arguments.

2019-08-19 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jvikstrom marked 2 inline comments as done. Closed by commit rL369275: [clangd] Added highlighting for tokens that are macro arguments. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a

[PATCH] D66122: [CodeGen] Emit dynamic initializers for static TLS vars in outlined scopes

2019-08-19 Thread Princeton Ferro via Phabricator via cfe-commits
Prince781 added a comment. In D66122#1633990 , @efriedma wrote: > I think we should send a defect report to the C++ standards committee to > clarify the ambiguity here. I followed the instructions on this page and

[PATCH] D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode

2019-08-19 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh accepted this revision. svenvh added a comment. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64418/new/ https://reviews.llvm.org/D64418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-19 Thread Denis Nikitin via Phabricator via cfe-commits
denik updated this revision to Diff 215945. denik added a comment. Changed Wpoison-system-directories warning to be disabled by default. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52524/new/ https://reviews.llvm.org/D52524 Files: clang/include/clang/Basic/DiagnosticCommonKinds.td

r369281 - Implement P1668R1

2019-08-19 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Mon Aug 19 10:39:59 2019 New Revision: 369281 URL: http://llvm.org/viewvc/llvm-project?rev=369281=rev Log: Implement P1668R1 Allow inline assembly statements in unexecuted branches of constexpr functions. Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-19 Thread Denis Nikitin via Phabricator via cfe-commits
denik marked 2 inline comments as done. denik added inline comments. Comment at: clang/include/clang/Basic/DiagnosticGroups.td:1071 +// cross-compiling. +def PoisonSystemDirectories : DiagGroup<"poison-system-directories">; + manojgupta wrote: > Please verify

r369286 - Fix poorly formatted HTML in the cxx_status.html file caused by adding

2019-08-19 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Mon Aug 19 11:14:22 2019 New Revision: 369286 URL: http://llvm.org/viewvc/llvm-project?rev=369286=rev Log: Fix poorly formatted HTML in the cxx_status.html file caused by adding 1668. Modified: cfe/trunk/www/cxx_status.html Modified: cfe/trunk/www/cxx_status.html

Re: r369217 - [Diagnostics] Diagnose misused xor as pow

2019-08-19 Thread Nico Weber via cfe-commits
Hi, this results in a false positive on webrtc, on this code: https://cs.chromium.org/chromium/src/third_party/libwebp/src/enc/picture_csp_enc.c?q=picture_csp_enc.c=package:chromium=1002 The code does this: #ifdef WORDS_BIGENDIAN #define ALPHA_OFFSET 0 // uint32_t 0xff00 is 0xff,00,00,00

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 215893. Charusso retitled this revision from "[analyzer] CastValueChecker: Store the dynamic types in DynamicTypeMap" to "[analyzer] CastValueChecker: Store the dynamic types and casts". Charusso added a comment. This patch introduces `DynamicCastInfo`

[PATCH] D66294: [Docs][OpenCL] Release 9.0 notes for OpenCL

2019-08-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 215894. Anastasia added a comment. - Added empty line and ; as requested on the review. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66294/new/ https://reviews.llvm.org/D66294 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNotes.rst

[PATCH] D66349: [clangd] Fix one testcase in XRefsTests.

2019-08-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:389 llvm::sort(References, [](const Reference , const Reference ) { - return std::tie(L.Loc, L.CanonicalTarget, L.Role) < - std::tie(R.Loc, R.CanonicalTarget, R.Role); +

[PATCH] D64741: [clangd] Added highlighting for tokens that are macro arguments.

2019-08-19 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 215907. jvikstrom marked 2 inline comments as done. jvikstrom added a comment. Rewrote conflicting token removal code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64741/new/ https://reviews.llvm.org/D64741

[PATCH] D66122: [CodeGen] Emit dynamic initializers for static TLS vars in outlined scopes

2019-08-19 Thread Princeton Ferro via Phabricator via cfe-commits
Prince781 updated this revision to Diff 215912. Prince781 added a comment. I think this should order the initializers deterministically according to their var declaration order. Let me know if there's something I haven't considered. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D66328: [DebugInfo] Add debug location to dynamic atexit destructor

2019-08-19 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: test/CodeGen/debug-info-no-location.cpp:4 +// CHECK-NEXT: ret void, !dbg !51 +// CHECK: !48 = distinct !DISubprogram(name: "`dynamic atexit destructor for 'f'", scope: !3, file: !3, line: 16, type: !49, scopeLine: 16, spFlags:

[PATCH] D66446: [clang][IFS] Adding new Interface Stubs format.

2019-08-19 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked an inline comment as done. plotfi added inline comments. Comment at: clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp:363 + OS << "IfsVersion: 1.0\n"; + OS << "Triple: " << T.str() << "\n"; + OS << "Symbols:\n"; This is missing

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Yay! I understand the rough idea and it looks perfectly reasonable to start with. Please add FIXMEs/TODOs on how we eventually want to support more complicated inheritance hierarchies. Comment at:

[PATCH] D66446: [clang][IFS] Adding new Interface Stubs format.

2019-08-19 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi created this revision. plotfi added a reviewer: compnerd. Herald added a project: clang. Herald added a subscriber: cfe-commits. plotfi marked an inline comment as done. plotfi added inline comments. Comment at: clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp:363 +

[PATCH] D66423: [analyzer] CastValueChecker: Model isa(), isa_and_nonnull()

2019-08-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:183 + if (Body) +DRE = dyn_cast(Body); + A body of a function is always either a `CompoundStmt` or (shockingly) a `CXXTryStmt`. This cast will always fail.

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeMap.h:32 +/// A set of dynamic cast informations. +REGISTER_SET_WITH_PROGRAMSTATE(DynamicCastSet, clang::ento::DynamicCastInfo) Charusso wrote: > NoQ

[clang-tools-extra] r369316 - Fix typo. "piont" => "point"

2019-08-19 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Mon Aug 19 17:28:21 2019 New Revision: 369316 URL: http://llvm.org/viewvc/llvm-project?rev=369316=rev Log: Fix typo. "piont" => "point" Found by Chris Morris (cwmorris). Modified: clang-tools-extra/trunk/clang-tidy/abseil/DurationConversionCastCheck.cpp

[PATCH] D66437: Sema: Create a no-op implicit cast for lvalue function conversions.

2019-08-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added a reviewer: rsmith. Herald added a project: clang. This fixes an assertion failure in the case where an implicit conversion for a function call involves an lvalue function conversion, and makes the AST for initializations involving implicit lvalue function

[PATCH] D66446: [clang][IFS] Adding new Interface Stubs format.

2019-08-19 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 216004. plotfi added a comment. Adding ObjectFileFormat Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66446/new/ https://reviews.llvm.org/D66446 Files: clang/include/clang/Frontend/FrontendActions.h

[PATCH] D66068: cmake: Make building clang-shlib optional

2019-08-19 Thread Jan Vesely via Phabricator via cfe-commits
jvesely added a comment. Hi, sorry for the delay. I fully understand the need to reduce the number of options. Having always used SHARED_LIBS build I remember weekly shared build breakages. That said, forcing everyone to build one huge library effectively makes debug builds unusable in any

r369308 - [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks

2019-08-19 Thread Anton Afanasyev via cfe-commits
Author: anton-afanasyev Date: Mon Aug 19 15:58:26 2019 New Revision: 369308 URL: http://llvm.org/viewvc/llvm-project?rev=369308=rev Log: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks Summary: Add `Frontend` time trace entry to `HandleTranslationUnit()` function.

[PATCH] D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks

2019-08-19 Thread Anton Afanasyev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369308: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks (authored by anton-afanasyev, committed by ). Herald added a subscriber: kristina. Changed prior to commit:

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicCastInfo.h:19 +public: + enum CastKind { Success, Fail }; + I suggest `enum CastResult { Success, Failure }` ("a fail" is slang, also "result" because it's

[PATCH] D65453: [analyzer] Improve the accuracy of the Clang call graph analysis

2019-08-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Thanks! I'll try to land again. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65453/new/ https://reviews.llvm.org/D65453 ___ cfe-commits

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Also thanks, everything makes sense now! Do we already have a test that will cover the necessity for having a map from regions to cast results? Eg.: void foo(Shape *C, Shape *T) { if (isa(S) && !isa(T)) clang_analyzer_warnIfReached(); //

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeMap.h:32 +/// A set of dynamic cast informations. +REGISTER_SET_WITH_PROGRAMSTATE(DynamicCastSet, clang::ento::DynamicCastInfo) NoQ wrote: > Emm, so

[PATCH] D52524: Add -Wpoison-system-directories warning

2019-08-19 Thread Denis Nikitin via Phabricator via cfe-commits
denik updated this revision to Diff 216021. denik added a comment. Removed check for libraries. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52524/new/ https://reviews.llvm.org/D52524 Files: clang/include/clang/Basic/DiagnosticCommonKinds.td

[PATCH] D63932: [GlobalDCE] Dead Virtual Function Elimination

2019-08-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D63932#1610182 , @ostannard wrote: > > Partial linking will indeed prevent dropping the virtual functions, but it > > should not prevent clearing the pointer to the virtual function in the > > vtable. The linker should then be

[PATCH] D66394: clang-cl: Enable /Zc:twoPhase by default if targeting MSVC 2017 update 3 or newer

2019-08-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm! I can't believe we didn't notice this for a year. Not long ago a Firefox developer filed a bug for a crash with `-fdelayed-template-parsing`, and if this works for them, we won't have to

[PATCH] D65453: [analyzer] Improve the accuracy of the Clang call graph analysis

2019-08-19 Thread Joshua Cranmer via Phabricator via cfe-commits
jcranmer-intel updated this revision to Diff 215999. jcranmer-intel added a comment. I think there are use cases for having a callgraph that errs on the side of adding edges that might not exist, but I'm happy enough to leave that for a later patch. This does remind me that we need a real

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeMap.h:32 +/// A set of dynamic cast informations. +REGISTER_SET_WITH_PROGRAMSTATE(DynamicCastSet, clang::ento::DynamicCastInfo) NoQ wrote: > Charusso

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D66325#1636091 , @NoQ wrote: > Yay! I understand the rough idea and it looks perfectly reasonable to start > with. Please add FIXMEs/TODOs on how we eventually want to support more > complicated inheritance hierarchies. I

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 216023. Charusso edited the summary of this revision. Charusso added a comment. - Use a set factory to store a dynamic cast information set per memory region. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66325/new/ https://reviews.llvm.org/D66325

[PATCH] D66404: [CFG] Make destructor calls more accurate

2019-08-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I have a few nitpicks but i still love this patch, thank you! It picks up the work exactly where i dropped it a year or so ago. > Respect C++17 copy elision; previously it would generate destructor calls for > elided temporaries, including in initialization and return

r369321 - [CallGraph] Take into accound calls that aren't within any function bodies.

2019-08-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Aug 19 19:22:37 2019 New Revision: 369321 URL: http://llvm.org/viewvc/llvm-project?rev=369321=rev Log: [CallGraph] Take into accound calls that aren't within any function bodies. This patch improves Clang call graph analysis by adding in expressions that are not found

[PATCH] D66328: [DebugInfo] Add debug location to dynamic atexit destructor

2019-08-19 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea updated this revision to Diff 216046. aganea marked 4 inline comments as done. aganea added a comment. As requested. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66328/new/ https://reviews.llvm.org/D66328 Files: lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGDeclCXX.cpp

[PATCH] D65453: [analyzer] Improve the accuracy of the Clang call graph analysis

2019-08-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369321: [CallGraph] Take into accound calls that arent within any function bodies. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

r369319 - [analyzer] NFC: Drop support for extra text attached to bug reports.

2019-08-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Aug 19 19:15:47 2019 New Revision: 369319 URL: http://llvm.org/viewvc/llvm-project?rev=369319=rev Log: [analyzer] NFC: Drop support for extra text attached to bug reports. It was introduced in 2011 but never used since then. Modified:

r369320 - [analyzer] NFC: Rename GRBugReporter to PathSensitiveBugReporter.

2019-08-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Aug 19 19:15:50 2019 New Revision: 369320 URL: http://llvm.org/viewvc/llvm-project?rev=369320=rev Log: [analyzer] NFC: Rename GRBugReporter to PathSensitiveBugReporter. The GR prefix is super ancient. Modified:

[PATCH] D66460: [analyzer] Remove BugReporter.BugTypes.

2019-08-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, rnkovacs, Szelethus, baloghadamsoftware, Charusso. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet. Herald added a project: clang. I'm slowly cleaning up `BugReporter`

[PATCH] D66348: [ASTImporter] Do not look up lambda classes

2019-08-19 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. I am not enthusiastic about this solution but I need to think about it some more. We can see that p0624r2 added assignable lambdas: bool f1() { auto x = []{} = {}; auto x2 = x;

[PATCH] D65410: [PassManager] First Pass implementation at -O1 pass pipeline

2019-08-19 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. In D65410#1613555 , @hfinkel wrote: > Thanks for starting on this. Can you go ahead and replace the sroa calls with > mem2reg calls for `O1` and then see what that does to the performance? That > strikes me as a major change,

[PATCH] D66406: [clangd] Update themeRuleMatcher when color theme changes in vscode extension.

2019-08-19 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Add event listener that listens to configuration changes and reloads the ThemeRuleMatcher when the theme

[PATCH] D66349: [clangd] Fix one testcase in XRefsTests.

2019-08-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:389 llvm::sort(References, [](const Reference , const Reference ) { - return std::tie(L.Loc, L.CanonicalTarget, L.Role) < - std::tie(R.Loc, R.CanonicalTarget, R.Role); +

[PATCH] D66349: [clangd] Fix one testcase in XRefsTests.

2019-08-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:389 llvm::sort(References, [](const Reference , const Reference ) { - return std::tie(L.Loc, L.CanonicalTarget, L.Role) < - std::tie(R.Loc, R.CanonicalTarget, R.Role); +

[PATCH] D66349: [clangd] Fix one testcase in XRefsTests.

2019-08-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:389 llvm::sort(References, [](const Reference , const Reference ) { - return std::tie(L.Loc, L.CanonicalTarget, L.Role) < - std::tie(R.Loc,

[PATCH] D66460: [analyzer] Remove BugReporter.BugTypes.

2019-08-19 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. > So we'll most likely make a clear separation between a basic bug report(er) > and a path-sensitive bug report(er), having them inherit from common bug > report(er) classes. That

[PATCH] D66137: [OpenCL][PR42385] Improve addr space deduction for pointers/references to arrays

2019-08-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369251: [OpenCL] Fix addr space deduction for pointers/references to arrays. (authored by stulova, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D65456: [OpenCL] Add generic type handling for builtin functions

2019-08-19 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369253: [OpenCL] Add generic type handling for builtin functions (authored by svenvh, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D62731: [RFC] Add support for options -fp-model= and -fp-speculation= : specify floating point behavior

2019-08-19 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. I don't believe I have any further comments. What do the front-end guys say? Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:126 + case LangOptions::FPM_Precise: + case LangOptions::FPM_Fast: +break; andrew.w.kaylor wrote: >

[PATCH] D66219: [clangd] Added a colorizer to the vscode extension.

2019-08-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:144 +// sends. +export class Colorizer { + private files: Map> = new Map(); The generic `T` doesnt seem to be used? Regarding the name, the

r369259 - Don't keep stale pointers to LoopInfos.

2019-08-19 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Mon Aug 19 06:37:41 2019 New Revision: 369259 URL: http://llvm.org/viewvc/llvm-project?rev=369259=rev Log: Don't keep stale pointers to LoopInfos. CGLoopInfo was keeping pointers to parent loop LoopInfos, but when the loop info vector grew, it reallocated the storage

  1   2   >