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

2019-09-06 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 219219. paulkirth added a comment. Improve diagnostic output with profile counts CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66324/new/ https://reviews.llvm.org/D66324 Files: clang/include/clang/Basic/DiagnosticFrontendKinds.td clang/includ

r371285 - Remove stale TLI Module level pass registration

2019-09-06 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Fri Sep 6 20:09:46 2019 New Revision: 371285 URL: http://llvm.org/viewvc/llvm-project?rev=371285&view=rev Log: Remove stale TLI Module level pass registration Clang patch to adapt to LLVM changes in D66428 that make the TLI require a Function. There is no longer a module-

[PATCH] D66043: Add to -Wparentheses case of bitwise-and ("&") and bitwise-or ("|") verses conditional operator ("?:")

2019-09-06 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu updated this revision to Diff 219213. rtrieu added a comment. Add more test cases and split new warnings into a separate warning group, but still under -Wparentheses CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66043/new/ https://reviews.llvm.org/D66043 Files: include/clang/

[PATCH] D67156: [Analyzer] Debug Checkers for Container and Iterator Inspection

2019-09-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D67156#1661881 , @Szelethus wrote: > I'm sadly not knowledgeable enough with `CallDescriptionMap` D62557 contains a basic example. Repository: rC Clang CHANGES SINCE LAST ACTION https://rev

[PATCH] D67156: [Analyzer] Debug Checkers for Container and Iterator Inspection

2019-09-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I'm sadly not knowledgeable enough with `CallDescriptionMap`, so let's have another round of review on this, otherwise, its perfect. We talked about dividing this checker into multiple files, which would also make reviewing a bit easier. With that done, combined with

[PATCH] D63978: Clang Interface Stubs merger plumbing for Driver

2019-09-06 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 219211. plotfi marked 2 inline comments as done. plotfi added a reviewer: cishida. plotfi added a comment. Adding better wiring up to llvm-ifs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63978/new/ https://rev

[PATCH] D65433: [clangd] DefineInline action availability checks

2019-09-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. When fully implemented, will define inline tweak work with C++ methods in classes as well? E.g. HEADER: class Foo { void foo(); } CPP: #include "Header.h" void Foo::foo() {} becomes: HEADER: class Foo { void foo() { } } CPP: #include "Header.h"

[PATCH] D67037: [ClangFormat] Add new style option IndentGotoLabels

2019-09-06 Thread Alex Cameron via Phabricator via cfe-commits
tetsuo-cpp added a comment. Friendly ping. Could I please get this looked at? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67037/new/ https://reviews.llvm.org/D67037 ___ cfe-commits mailing list cfe-commits@lists.ll

r371279 - [clang][DependencyFileGenerator] Fix missing -MT option handling

2019-09-06 Thread Jan Korous via cfe-commits
Author: jkorous Date: Fri Sep 6 17:59:13 2019 New Revision: 371279 URL: http://llvm.org/viewvc/llvm-project?rev=371279&view=rev Log: [clang][DependencyFileGenerator] Fix missing -MT option handling Targets in DependencyFileGenerator don't necessarily come from -MT option. Differential Revision:

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

2019-09-06 Thread Richard Smith via cfe-commits
On Tue, 3 Sep 2019 at 17:59, Kamil Rytarowski via Phabricator via cfe-commits wrote: > krytarowski added a comment. > > In D66361#1656037 , @rsmith > wrote: > > > In D66361#1655903 , > @krytarowski wrote: > > > > >

[PATCH] D58094: Fix -Wnonportable-include-path suppression for header maps with absolute paths.

2019-09-06 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM. I have one idea for you to consider inline. Comment at: clang/lib/Lex/HeaderSearch.cpp:892-902 +IsInHeaderMap, MappedName); +if (!MappedName.empty(

r371277 - Fix thunks.cpp test, don't FileCheck for anon namespace id

2019-09-06 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Sep 6 17:41:08 2019 New Revision: 371277 URL: http://llvm.org/viewvc/llvm-project?rev=371277&view=rev Log: Fix thunks.cpp test, don't FileCheck for anon namespace id The anon namespace id is a hash of the main input path to the compiler, which varies in the test suite becau

[PATCH] D65256: [Sema][ObjC] Mark C union fields that have non-trivial ObjC ownership qualifications as unavailable if the union is declared in a system header

2019-09-06 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL371276: [Sema][ObjC] Mark C union fields that have non-trivial ObjC ownership (authored by ahatanak, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

r371276 - [Sema][ObjC] Mark C union fields that have non-trivial ObjC ownership

2019-09-06 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Sep 6 17:34:47 2019 New Revision: 371276 URL: http://llvm.org/viewvc/llvm-project?rev=371276&view=rev Log: [Sema][ObjC] Mark C union fields that have non-trivial ObjC ownership qualifications as unavailable if the union is declared in a system header r365985 stopped ma

r371275 - [Sema] Diagnose default-initialization, destruction, and copying of

2019-09-06 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Sep 6 17:34:43 2019 New Revision: 371275 URL: http://llvm.org/viewvc/llvm-project?rev=371275&view=rev Log: [Sema] Diagnose default-initialization, destruction, and copying of non-trivial C union types This recommits r365985, which was reverted because it broke a few pr

[PATCH] D63960: [C++20] Add consteval-specifique semantic for functions

2019-09-06 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 219205. Tyker retitled this revision from "[C++20] Add consteval-specifique semantic" to "[C++20] Add consteval-specifique semantic for functions". Tyker added a comment. Herald added a subscriber: mgrang. I narrowed the patch because it was getting quite big.

[PATCH] D67156: [Analyzer] Debug Checkers for Container and Iterator Inspection

2019-09-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:1328-1337 +def ContainerInspectionChecker : Checker<"ContainerInspection">, + HelpText<"Check the analyzer's understanding of C++ containers">, + Dependencies<[IteratorModeling]>, + Docume

[PATCH] D67156: [Analyzer] Debug Checkers for Container and Iterator Inspection

2019-09-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Yup, thanks, this is really nice! Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:243-244 + Getter get) const; + void analyzerContainerBegin(const CallExpr *CE, CheckerContext &C) const; + void analyzerContaine

[PATCH] D67156: [Analyzer] Debug Checkers for Container and Iterator Inspection

2019-09-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Nice! Thank you so much for sorting this out! I think this will make reviewing far more accessible for newcomers to the IteratorChecker family. I have a couple nits to comment on, but I won't clutter the code just yet. @NoQ, do you have any high level objections t

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-06 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin updated this revision to Diff 219203. aheejin added a comment. - Error out when -fwasm-exceptions is specified with -enable-emscripten-cxx-exceptions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67208/new/ https://reviews.llvm.org/D67208

[PATCH] D66572: [analyzer] NFC: BugReporter Separation Ep.I.

2019-09-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. But, of course, let's wait for @gribozavr to give his blessings as well, I'm only accepting because removing/changing other parts of the API seems to deserve a separate revision :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66572/new/ https://reviews.llvm

[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

2019-09-06 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. > But TLDR, either the fix in https://github.com/google/filament/pull/1566 > is incorrect and the actually-bad code is elsewhere, > or you have some other unsanitized UB elsewhere. Could be both :S My money is on "both" :p I tested a random sample of a couple thousan

[PATCH] D66572: [analyzer] NFC: BugReporter Separation Ep.I.

2019-09-06 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. This patch set the goal of splitting `BugReport` into two different report kinds, and I think it did that well. Not only that, we drastically improved the documentation, formalized many

[PATCH] D67200: Add -static-openmp driver option

2019-09-06 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama updated this revision to Diff 219200. pirama edited the summary of this revision. pirama added a comment. Test -static, -static-openmp interaction. Added these only for iomp5 to avoid test-case explosion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-06 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added a comment. In D67208#1661694 , @tlively wrote: > What happens when users have exceptions in their code but don't pass Do they > get the old SJLJ emulated exception handling? The current emscripten EH is enabled by `-mllvm -enable-emscrip

[PATCH] D65256: [Sema][ObjC] Mark C union fields that have non-trivial ObjC ownership qualifications as unavailable if the union is declared in a system header

2019-09-06 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. Okay, thanks. LGTM. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65256/new/ https://reviews.llvm.org/D65256 __

[PATCH] D58094: Fix -Wnonportable-include-path suppression for header maps with absolute paths.

2019-09-06 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked 4 inline comments as done. vsapsai added a comment. Updated the code. Hope it is easier to understand now. Comment at: clang/lib/Lex/HeaderSearch.cpp:908-909 +if (IsMapped) + *IsMapped = CurrentInHeaderMap || HasBeenMapped; + dexonsmit

[PATCH] D58094: Fix -Wnonportable-include-path suppression for header maps with absolute paths.

2019-09-06 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 219194. vsapsai added a comment. - Add a test for unused absolute path in a header map; simplify code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58094/new/ https://reviews.llvm.org/D58094 Files: clang/include/clang/Lex/DirectoryLookup.h cla

[PATCH] D67028: Use musttail for variadic method thunks when possible

2019-09-06 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL371269: Use musttail for variadic method thunks when possible (authored by rnk, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://re

r371269 - Use musttail for variadic method thunks when possible

2019-09-06 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Sep 6 15:55:26 2019 New Revision: 371269 URL: http://llvm.org/viewvc/llvm-project?rev=371269&view=rev Log: Use musttail for variadic method thunks when possible This avoids cloning variadic virtual methods when the target supports musttail and the return type is not covaria

[PATCH] D67200: Add -static-openmp driver option

2019-09-06 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama added a comment. I'll update this review addressing @Joerg's reply to cfe-commits: > Needs testing for the -static interaction? Thanks @srhines for pointing me to it - I'd only subscribed to cfe-dev and not cfe-commits so I'd missed it.. Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D67028: Use musttail for variadic method thunks when possible

2019-09-06 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67028/new/ https://reviews.llvm.org/D67028 ___

[PATCH] D67249: [Modules][PCH] Hash input files content

2019-09-06 Thread Juergen Ributzka via Phabricator via cfe-commits
ributzka added inline comments. Comment at: clang/lib/Serialization/ASTWriter.cpp:1767 bool IsTopLevelModuleMap; + uint32_t ContentHash[2]; }; bruno wrote: > aprantl wrote: > > Why is this not a uint64_t? > Serializing a `uint64_t` directly instead of two `u

[PATCH] D65256: [Sema][ObjC] Mark C union fields that have non-trivial ObjC ownership qualifications as unavailable if the union is declared in a system header

2019-09-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaDecl.cpp:11144 + // Ignore unavailable fields since they don't affect the triviality of the + // containing struct/union. + return FD->hasAttr(); rjmccall wrote: > The "since" clause here is circular: th

[PATCH] D65256: [Sema][ObjC] Mark C union fields that have non-trivial ObjC ownership qualifications as unavailable if the union is declared in a system header

2019-09-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 219191. ahatanak marked 2 inline comments as done. ahatanak added a comment. Rename function and fix comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65256/new/ https://reviews.llvm.org/D65256 Files: include/clang/

[PATCH] D67028: Use musttail for variadic method thunks when possible

2019-09-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk marked an inline comment as done. rnk added inline comments. Comment at: clang/test/CodeGenCXX/ms-thunks-variadic-return.cpp:9 +struct B : virtual A { + // expected-error@+1 2 {{cannot compile this return-adjusting thunk with variadic arguments yet}} + B *clone(const char

[PATCH] D67304: Unify checking enumerator values in ObjC, C, and MSVC modes

2019-09-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. rnk added reviewers: hans, rsmith, STL_MSFT. Herald added a project: clang. These three modes need to range check enumerator values differently than C++ does. Before this change, we had two codepaths doing the same thing in two cases: 1. enum complete (ObjC fixed & Micr

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-06 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. Thanks for the clarification. It makes sense to me that `-mexception-handling` only enables the architectural feature and a separate flag enables the behavior change. This is indeed consistent with how `-pthread` works. What happens when users have exceptions in their c

[PATCH] D67200: Add -static-openmp driver option

2019-09-06 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama added a comment. In D67200#1660147 , @srhines wrote: > Looks really nice. I am sure the NDK developers will be happy to see support > for static OpenMP. Do you want to add the public NDK github issue link in the > commit message? Done. In D6720

[PATCH] D67200: Add -static-openmp driver option

2019-09-06 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama updated this revision to Diff 219182. pirama added a comment. Herald added a subscriber: ychen. Mention NDK issue https://github.com/android-ndk/ndk/issues/1028. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67200/new/ https://reviews.llvm.o

[PATCH] D59637: [analyzer] Use the custom propagation rules and sinks in GenericTaintChecker

2019-09-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. I'm fine with moving in-class function into anonymous namespace later. LGTM, feel free to commit! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59637/new/ https://reviews.llvm.org/D59637 ___

[PATCH] D67135: [clang-tidy] performance-inefficient-vector-operation: Support proto repeated field

2019-09-06 Thread Cong Liu via Phabricator via cfe-commits
congliu added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp:227 +std::string MutableFieldName = +("mutable_" + ProtoAddFieldCall->getMethodDecl()->getName().substr(4)) +.str(); h

[PATCH] D67135: [clang-tidy] performance-inefficient-vector-operation: Support proto repeated field

2019-09-06 Thread Cong Liu via Phabricator via cfe-commits
congliu updated this revision to Diff 219180. congliu marked 7 inline comments as done. congliu added a comment. Addressed Haojian's comments. - Do not warn when there is reference to the proto variable between its declaration and the loop body. - Exclude const methods. - Update tests. CHANGES

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-09-06 Thread Jussi Pakkanen via Phabricator via cfe-commits
jpakkane updated this revision to Diff 219179. jpakkane added a comment. Ordered doc list alphabetically. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64671/new/ https://reviews.llvm.org/D64671 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tools-extra/

[PATCH] D67302: Configure my project to use arcanist.

2019-09-06 Thread Cong Liu via Phabricator via cfe-commits
congliu created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D67302 Files: clang-tools-extra/.arcconfig clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp clang

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-09-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D64671#1661585 , @jpakkane wrote: > > It'll be reasonable to get IncludeStyle default from .clang-format. > > I looked at existing checks and they all do the same thing as this one. In > fact I got the code for this by d

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-09-06 Thread Jussi Pakkanen via Phabricator via cfe-commits
jpakkane marked an inline comment as done. jpakkane added a comment. > It'll be reasonable to get IncludeStyle default from .clang-format. I looked at existing checks and they all do the same thing as this one. In fact I got the code for this by directly copypasting an existing check. Grepping

[PATCH] D67253: clang-misexpect: a standalone tool for verifying the use of __builtin_expect with PGO data

2019-09-06 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 219173. paulkirth added a comment. Remove commented out code CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67253/new/ https://reviews.llvm.org/D67253 Files: clang-tools-extra/CMakeLists.txt clang-tools-extra/clang-misexpect/CMakeLists.txt c

[PATCH] D67253: clang-misexpect: a standalone tool for verifying the use of __builtin_expect with PGO data

2019-09-06 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 219171. paulkirth added a comment. Address code review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67253/new/ https://reviews.llvm.org/D67253 Files: clang-tools-extra/CMakeLists.txt clang-tools-extra/c

[PATCH] D59637: [analyzer] Use the custom propagation rules and sinks in GenericTaintChecker

2019-09-06 Thread Borsik Gábor via Phabricator via cfe-commits
boga95 updated this revision to Diff 219172. boga95 marked 7 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59637/new/ https://reviews.llvm.org/D59637 Files: clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp clang/test/Analysis/taint-generic.c Index:

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-09-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be reasonable to get IncludeStyle default from .clang-format. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:71 + +- New :doc:`cppcoreguidelines-init-variables + ` check. Please sort new checks list alphabetically.

[PATCH] D65182: [analyzer] Add fix-it hint support.

2019-09-06 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL371257: [analyzer] Add minimal support for fix-it hints. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://r

[PATCH] D67249: [Modules][PCH] Hash input files content

2019-09-06 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 219168. bruno added a comment. Remove pasto from one of the testcases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67249/new/ https://reviews.llvm.org/D67249 Files: clang/include/clang/Basic/DiagnosticSeriali

r371257 - [analyzer] Add minimal support for fix-it hints.

2019-09-06 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Sep 6 13:55:29 2019 New Revision: 371257 URL: http://llvm.org/viewvc/llvm-project?rev=371257&view=rev Log: [analyzer] Add minimal support for fix-it hints. Allow attaching fixit hints to Static Analyzer BugReports. Fixits are attached either to the bug report itself

[PATCH] D67019: [analyzer] pr43179: CallDescription: Check number of parameters as well as number of arguments.

2019-09-06 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL371256: [analyzer] pr43179: Make CallDescription defensive against C variadic functions. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Chan

r371256 - [analyzer] pr43179: Make CallDescription defensive against C variadic functions.

2019-09-06 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Sep 6 13:55:24 2019 New Revision: 371256 URL: http://llvm.org/viewvc/llvm-project?rev=371256&view=rev Log: [analyzer] pr43179: Make CallDescription defensive against C variadic functions. Most functions that our checkers react upon are not C-style variadic functions,

[PATCH] D67249: [Modules][PCH] Hash input files content

2019-09-06 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 219166. bruno added a comment. Update testcase to use a more portable version of `touch` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67249/new/ https://reviews.llvm.org/D67249 Files: clang/include/clang/Basi

[PATCH] D67292: [clang-tidy] Fix bug in bugprone-use-after-move check

2019-09-06 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang-tools-extra/test/clang-tidy/bugprone-use-after-move.cpp:1198 +} + } for (int i = 0; i < 10; ++i) { ymandel wrote: > gribozavr wrote: > > Unless you think it is redundant, could you also add > > > > ``` >

[PATCH] D65182: [analyzer] Add fix-it hint support.

2019-09-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:491 + ArrayRef Ranges = None, + ArrayRef Fixits = None); gribozavr wrote:

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-09-06 Thread Jussi Pakkanen via Phabricator via cfe-commits
jpakkane updated this revision to Diff 219162. jpakkane added a comment. Added documentation. Well, actually just swiped it from abseil-string-find-startswith. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64671/new/ https://reviews.llvm.org/D64671 Files: clang-tools-extra/clang-tid

[PATCH] D65182: [analyzer] Add fix-it hint support.

2019-09-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:343 + /// to produce a good fix-it hint for most path-sensitive warnings. + void addFixItHint(const FixItHint &F) { +Fixits.push_b

[PATCH] D67249: [Modules][PCH] Hash input files content

2019-09-06 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno marked 2 inline comments as done. bruno added a comment. > Nice! Are you planning to address the FIXME's in a later update of this patch? The FIXME's are just replaying what the code around does, both error dropping and `FileEntryRef` are recent changes that didn't make all the way throu

Re: r371004 - [c++20] Fix some ambiguities in our mangling of lambdas with explicit

2019-09-06 Thread Richard Smith via cfe-commits
On Thu, 5 Sep 2019 at 17:39, Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Wed, Sep 4, 2019 at 9:22 PM Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rsmith >> Date: Wed Sep 4 18:23:47 2019 >> New Revision: 371004 >> >> URL: http://llvm.or

r371252 - Update comment for mangling to match extended mangling rule in r371004.

2019-09-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Sep 6 13:32:01 2019 New Revision: 371252 URL: http://llvm.org/viewvc/llvm-project?rev=371252&view=rev Log: Update comment for mangling to match extended mangling rule in r371004. Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp Modified: cfe/trunk/lib/AST/ItaniumMang

Re: r371222 - [Diagnostics] Refactor code for -Wsizeof-pointer-div, catch more cases; also add -Wsizeof-array-div

2019-09-06 Thread Richard Smith via cfe-commits
In addition to the below, this also seems to be missing any test coverage for the new warning. Did you forget to add a test file? On Fri, 6 Sep 2019 at 12:38, Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > This reports things like > > error: expresion will return the incorrect

r371250 - [clang][Index][NFC] Put IndexingOptions to a separate header

2019-09-06 Thread Jan Korous via cfe-commits
Author: jkorous Date: Fri Sep 6 13:08:32 2019 New Revision: 371250 URL: http://llvm.org/viewvc/llvm-project?rev=371250&view=rev Log: [clang][Index][NFC] Put IndexingOptions to a separate header Added: cfe/trunk/include/clang/Index/IndexingOptions.h Modified: cfe/trunk/include/clang/Index

[clang-tools-extra] r371250 - [clang][Index][NFC] Put IndexingOptions to a separate header

2019-09-06 Thread Jan Korous via cfe-commits
Author: jkorous Date: Fri Sep 6 13:08:32 2019 New Revision: 371250 URL: http://llvm.org/viewvc/llvm-project?rev=371250&view=rev Log: [clang][Index][NFC] Put IndexingOptions to a separate header Modified: clang-tools-extra/trunk/clangd/XRefs.cpp clang-tools-extra/trunk/clangd/index/FileIn

[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

2019-09-06 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I will still need to see where else `EmitCheckedInBoundsGEP()` should be used, but i'm wondering if it should be best done in follow-ups, since this already catches the interesting bits.. In D67122#1659721 , @vsk wrote: > Sti

Re: r371241 - [LifetimeAnalysis] don't use raw string literals in macros

2019-09-06 Thread Nico Weber via cfe-commits
(The slightly more usual fix is to do `const char kFoo[] = R"cpp(...)cpp"; EXPECT_TRUE(matches(kFoo...)`) On Fri, Sep 6, 2019 at 3:13 PM Matthias Gehre via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: mgehre > Date: Fri Sep 6 12:15:02 2019 > New Revision: 371241 > > URL: http://llv

Re: r371222 - [Diagnostics] Refactor code for -Wsizeof-pointer-div, catch more cases; also add -Wsizeof-array-div

2019-09-06 Thread Nico Weber via cfe-commits
This reports things like error: expresion will return the incorrect number of elements in the array; the array element type is 'const char *', not 'char *' which doesn't look quite right... On Fri, Sep 6, 2019 at 12:11 PM David Bolvansky via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Au

Re: r371182 - Reland [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-09-06 Thread Matthias Gehre via cfe-commits
Yvan, sorry! Should be fixed now. Am Fr., 6. Sept. 2019 um 16:40 Uhr schrieb Yvan Roux : > Hi Matthias, > > this commit broke AArch64 bots, logs are available here: > > > http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/19917/steps/ninja%20check%201/logs/stdio > > Thanks, > Yvan

r371241 - [LifetimeAnalysis] don't use raw string literals in macros

2019-09-06 Thread Matthias Gehre via cfe-commits
Author: mgehre Date: Fri Sep 6 12:15:02 2019 New Revision: 371241 URL: http://llvm.org/viewvc/llvm-project?rev=371241&view=rev Log: [LifetimeAnalysis] don't use raw string literals in macros They broke the AArch64 bots (gcc does not support it) Modified: cfe/trunk/unittests/Sema/GslOwnerPoi

[PATCH] D67292: [clang-tidy] Fix bug in bugprone-use-after-move check

2019-09-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang-tools-extra/test/clang-tidy/bugprone-use-after-move.cpp:1198 +} + } for (int i = 0; i < 10; ++i) { gribozavr wrote: > Unless you think it is redundant, could you al

[PATCH] D64644: [Sema] Fixes an assertion failure while instantiation a template with an incomplete typo corrected type

2019-09-06 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. Thanks for the review. Could you commit this patch? I don't have commit access. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64644/new/ https://reviews.llvm.org/D64644 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D67292: [clang-tidy] Fix bug in bugprone-use-after-move check

2019-09-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 219152. ymandel added a comment. Added tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67292/new/ https://reviews.llvm.org/D67292 Files: clang-tools-extra/clang-tidy/utils/ExprSequence.cpp clang-tools

[PATCH] D65917: [clang-tidy] Added check for the Google style guide's category method naming rule.

2019-09-06 Thread David Gatwood via Phabricator via cfe-commits
dgatwood added inline comments. Comment at: clang-tools-extra/clang-tidy/google/RequireCategoryMethodPrefixesCheck.cpp:57 + } + std::string method_name = method_declaration->getNameAsString(); + auto owning_objc_class_interface = method_declaration->getClassInterface(); -

[PATCH] D65917: [clang-tidy] Added check for the Google style guide's category method naming rule.

2019-09-06 Thread David Gatwood via Phabricator via cfe-commits
dgatwood updated this revision to Diff 219151. dgatwood marked 9 inline comments as done. dgatwood added a comment. Tweaked documentation, and replaced the one remaining instance of getNameAsString(). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65917/new/ https://reviews.llvm.org/D65

[PATCH] D67292: [clang-tidy] Fix bug in bugprone-use-after-move check

2019-09-06 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added a comment. This revision is now accepted and ready to land. Thanks for the quick fix! Comment at: clang-tools-extra/test/clang-tidy/bugprone-use-after-move.cpp:1198 +} + } for (int i = 0; i < 10; ++i) {

[PATCH] D65761: Add Windows Control Flow Guard checks (/guard:cf).

2019-09-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: llvm/lib/Target/X86/X86FixupCFGuard.cpp:13 +/// for such cases and replaces the pair of instructions with a single +/// call/invoke. For example: +/// hans wrote: > Naive question: Why do we generate code as in the examples

[PATCH] D58094: Fix -Wnonportable-include-path suppression for header maps with absolute paths.

2019-09-06 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked 3 inline comments as done. vsapsai added inline comments. Comment at: clang/lib/Lex/HeaderSearch.cpp:888 bool InUserSpecifiedSystemFramework = false; -bool HasBeenMapped = false; +bool CurrentInHeaderMap = false; bool IsFrameworkFoundInDir = false

[PATCH] D67294: Register and parse a simplified version of '#pragma omp declare variant'

2019-09-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/Basic/Attr.td:3202 +def OMPDeclareVariantDecl : Attr { + let Spellings = [Pragma<"omp", "declare variant">]; For the first patch we don't need the attribute, just parsing/sema analysis

[PATCH] D65256: [Sema][ObjC] Mark C union fields that have non-trivial ObjC ownership qualifications as unavailable if the union is declared in a system header

2019-09-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Herald added a subscriber: ychen. Comment at: lib/Sema/SemaDecl.cpp:11142 +bool ignoreForTrivialityComputation(const FieldDecl *FD) { + // Ignore unavailable fields since they don't affect the triviality of the `shouldIgnoreForR

[PATCH] D67253: clang-misexpect: a standalone tool for verifying the use of __builtin_expect with PGO data

2019-09-06 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang-tools-extra/clang-misexpect/ClangMisExpect.cpp:77 +break; +llvm_unreachable("Bad Profile Format given to clang-misexpect use one of " + "(clang, llvm, csllvm, sample)"); Nit: llvm_un

[PATCH] D67294: Register and parse a simplified version of '#pragma omp declare variant'

2019-09-06 Thread Andrzej Warzynski via Phabricator via cfe-commits
andwar created this revision. andwar added a reviewer: ABataev. Herald added a reviewer: jdoerfert. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch implements the basic parsing and semantic analysis of `#pragma omp declare variant`: * registers '#pragma om

[PATCH] D67292: [clang-tidy] Fix bug in bugprone-use-after-move check

2019-09-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a subscriber: xazax.hun. Herald added a project: clang. The bugprone-use-after-move check exhibits false positives for certain uses of the C++17 if/switch init statements. These false positives are caused by a bug in

[PATCH] D67253: clang-misexpect: a standalone tool for verifying the use of __builtin_expect with PGO data

2019-09-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang-tools-extra/clang-misexpect/tool/ClangMisExpectMain.cpp:33 +using namespace clang::tooling; +using namespace clang::misexpect; +using Path = std::string; The `using` statements here should match clang-tool

[PATCH] D67290: [clangd] Add a new highlighting kind for typedefs

2019-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: hokein. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. ilya-biryukov added a parent revision: D66516: [clangd] Highlight typedefs to template parameters as template parameters. ilya

[PATCH] D67290: [clangd] Add a new highlighting kind for typedefs

2019-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:530 + case HighlightingKind::Typedef: +return "entity.name.type.typedef.cpp"; case HighlightingKind::Namespace: -

[PATCH] D64672: [X86] Prevent passing vectors of __int128 as in llvm IR

2019-09-06 Thread Craig Topper via Phabricator via cfe-commits
craig.topper closed this revision. craig.topper added a comment. Committed in r371169, but I forgot the Differential Revision line CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64672/new/ https://reviews.llvm.org/D64672 ___ cfe-commits mail

Re: [PATCH] D67200: Add -static-openmp driver option

2019-09-06 Thread Joerg Sonnenberger via cfe-commits
On Wed, Sep 04, 2019 at 11:28:34PM +, Pirama Arumuga Nainar via Phabricator via cfe-commits wrote: > pirama created this revision. > pirama added reviewers: Hahnfeld, danalbert, srhines, joerg. > Herald added a subscriber: guansong. > Herald added a reviewer: jdoerfert. > Herald added a projec

[PATCH] D66951: [ASTImporter] Add comprehensive tests for ODR violation handling strategies

2019-09-06 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 3 inline comments as done. martong added a comment. In D66951#1660886 , @balazske wrote: > OK > Probably the `ClassTemplateSpec` can not be handled in liberal way because > the AST data structure for template specializations do not allow m

r371226 - [NFCI] Unbreak buildbots

2019-09-06 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Fri Sep 6 09:30:44 2019 New Revision: 371226 URL: http://llvm.org/viewvc/llvm-project?rev=371226&view=rev Log: [NFCI] Unbreak buildbots Removed: cfe/trunk/test/Sema/div-sizeof-array.cpp Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td cfe/trunk/li

r371223 - [NFC] Added new tests for r371222

2019-09-06 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Fri Sep 6 09:18:18 2019 New Revision: 371223 URL: http://llvm.org/viewvc/llvm-project?rev=371223&view=rev Log: [NFC] Added new tests for r371222 Added: cfe/trunk/test/Sema/div-sizeof-array.cpp Added: cfe/trunk/test/Sema/div-sizeof-array.cpp URL: http://llvm.org/viewv

r371222 - [Diagnostics] Refactor code for -Wsizeof-pointer-div, catch more cases; also add -Wsizeof-array-div

2019-09-06 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Fri Sep 6 09:12:48 2019 New Revision: 371222 URL: http://llvm.org/viewvc/llvm-project?rev=371222&view=rev Log: [Diagnostics] Refactor code for -Wsizeof-pointer-div, catch more cases; also add -Wsizeof-array-div Previously, -Wsizeof-pointer-div failed to catch: const int *

[PATCH] D62445: [test] Fix plugin tests

2019-09-06 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In D62445#1630518 , @NoQ wrote: > I didn't make much progress so far, but i marked the test as `// UNSUPPORTED: > darwin` in rC368765 , so the buildbot is > now green starting with > http://gr

[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-09-06 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon requested changes to this revision. RKSimon added a comment. This revision now requires changes to proceed. In D60748#1524443 , @wxiao3 wrote: > Thanks for the information! > We have reverted the patch and will resubmit it when we have a complete

[PATCH] D67058: [clang][CodeGen] Add alias for cpu_dispatch function with IFunc & Fix resolver linkage type

2019-09-06 Thread Sr.Zhang via Phabricator via cfe-commits
zsrkmyn marked an inline comment as done. zsrkmyn added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3002 false); llvm::Constant *Resolver = GetOrCreateLLVMFunction( MangledName + ".resolver", ResolverType, GlobalDecl{},

[PATCH] D67216: [cfi] Add flag to always generate call frame information

2019-09-06 Thread David Candler via Phabricator via cfe-commits
dcandler added a comment. Herald added a subscriber: ychen. I was actually torn myself on whether to put the flag in the g group or not, so I'm happy to rename it. As far as I could find, no compiler has an existing option to control this: instead armcc always includes a debug_frame section by

Re: r371182 - Reland [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-09-06 Thread Yvan Roux via cfe-commits
Hi Matthias, this commit broke AArch64 bots, logs are available here: http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/19917/steps/ninja%20check%201/logs/stdio Thanks, Yvan On Fri, 6 Sep 2019 at 10:54, Matthias Gehre via cfe-commits wrote: > > Author: mgehre > Date: Fri Sep

[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

2019-09-06 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 219103. lebedev.ri marked 4 inline comments as done. lebedev.ri added a comment. Rebased over precommitted NFC changes, much nicer diff! :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67122/new/ https://re

  1   2   >