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

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

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

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

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

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

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:

[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

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

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

<    1   2