[PATCH] D50953: [clang-tidy] Handle sugared reference types in ExprMutationAnalyzer

2018-09-10 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added a comment. In https://reviews.llvm.org/D50953#1229287, @JonasToth wrote: > What happens to pointers in a typedef (in the sense of `*` instead of `&`)? I checked around and I believe reference type is the only type we're explicitly matching right now. We'll need to handle

[PATCH] D50953: [clang-tidy] Handle sugared reference types in ExprMutationAnalyzer

2018-09-10 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 164806. shuaiwang marked 2 inline comments as done. shuaiwang added a comment. more test cases. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50953 Files: clang-tidy/utils/ExprMutationAnalyzer.cpp

r341902 - [Modules] Add imported modules to the output of -module-file-info

2018-09-10 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Mon Sep 10 22:17:13 2018 New Revision: 341902 URL: http://llvm.org/viewvc/llvm-project?rev=341902=rev Log: [Modules] Add imported modules to the output of -module-file-info Fix a bug in the deserialization of IMPORTS section and allow for imported modules to also be printed

[PATCH] D51910: [Modules] Add platform feature to requires clause

2018-09-10 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added reviewers: rsmith, v.g.vassilev, aprantl. Herald added subscribers: dexonsmith, srhines. Allows module map writers to add build requirements based on platform/os. Useful when target features and language dialects aren't enough to conditionalize building

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2018-09-10 Thread Tanoy Sinha via Phabricator via cfe-commits
tks2103 added a comment. ping @GorNishanov Repository: rC Clang https://reviews.llvm.org/D51741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r341891 - Revert "Revert "[clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer""

2018-09-10 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Mon Sep 10 19:23:35 2018 New Revision: 341891 URL: http://llvm.org/viewvc/llvm-project?rev=341891=rev Log: Revert "Revert "[clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer"" This is the same as D50619 plus fixes for buildbot failures on windows. The

[PATCH] D51901: Thread Safety Analysis: warnings for attributes without arguments

2018-09-10 Thread Josh Gao via Phabricator via cfe-commits
jmgao added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:3016-3017 +def warn_thread_attribute_not_on_capability_member : Warning< + "%0 attribute without capability arguments can only be applied in a class " + "annotated with 'capability' or

[PATCH] D51901: Thread Safety Analysis: warnings for attributes without arguments

2018-09-10 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. The second warning message is a bit long, so if any of you have a better idea I'd welcome it. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:3016-3017 +def warn_thread_attribute_not_on_capability_member : Warning< + "%0 attribute without

[PATCH] D51899: Remove extraneous ".a" suffix from baremetal clang_rt.builtins when compiling for baremetal.

2018-09-10 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. Sorry, didn't notice this was recently added, from looking at Darwin and Android embedded tests, this doesn't really match up with either of them. The hosted tests for Android using `libbuiltins` look like this: // RUN: %clang -target arm-linux-androideabi

[PATCH] D51901: Thread Safety Analysis: warnings for attributes without arguments

2018-09-10 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added reviewers: aaron.ballman, delesley, jmgao. Herald added a subscriber: cfe-commits. When thread safety annotations are used without capability arguments, they are assumed to apply to `this` instead. So we warn when either `this` doesn't exist,

[PATCH] D51899: Remove extraneous ".a" suffix from baremetal clang_rt.builtins when compiling for baremetal.

2018-09-10 Thread Robert Widmann via Phabricator via cfe-commits
CodaFi added a comment. The regression tests are only against the text of the driver's cc1 commands. It's not actually testing if we can compile. https://reviews.llvm.org/D51899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51899: Remove extraneous ".a" suffix from baremetal clang_rt.builtins when compiling for baremetal.

2018-09-10 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a reviewer: t.p.northover. kristina added a comment. Added the main ARM code owner as a reviewer, I'm not entirely sure why you're getting this behavior since regression tests should have weeded it out. https://reviews.llvm.org/D51899

[PATCH] D51899: Remove extraneous ".a" suffix from baremetal clang_rt.builtins when compiling for baremetal.

2018-09-10 Thread Robert Widmann via Phabricator via cfe-commits
CodaFi added a comment. @kristina They're having linker troubles because this driver is hardcoding an incorrect linker flag for libbuiltin on the arm-baremetal triple. https://reviews.llvm.org/D33259 introduced this incorrect behavior by smashing together the incorrect

[PATCH] D51899: Remove extraneous ".a" suffix from baremetal clang_rt.builtins when compiling for baremetal.

2018-09-10 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. The library shouldn't be an object file (it could be if you changed some stuff around but typically isn't), `libbuiltins` is a combination of multiple translation units, if you look at the source. I'm not sure how it's turning into an object file for you and even if

[PATCH] D51899: Remove extraneous ".a" suffix from baremetal clang_rt.builtins when compiling for baremetal.

2018-09-10 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. @kristina both bfd and lld are adding the `.a ` extension when you pass a lib through -l. Similarly to -llibfoo won't work, -lfoo.a will lead the linker to look for libfoo.a.a https://reviews.llvm.org/D51899 ___

[PATCH] D51899: Remove extraneous ".a" suffix from baremetal clang_rt.builtins when compiling for baremetal.

2018-09-10 Thread George Morgan via Phabricator via cfe-commits
georgemorgan added a comment. @kristina, the library isn't being passed as an object file to the linker but rather as a library name. Hence, the `.a` suffix is not correct. https://reviews.llvm.org/D51899 ___ cfe-commits mailing list

[PATCH] D51899: Remove extraneous ".a" suffix from baremetal clang_rt.builtins when compiling for baremetal.

2018-09-10 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. Please submit your diffs with context in the future (`-U9`). Also this seems like it would break a lot, `.a` is just a generic extension for an object archive file, I don't think the extension is the issue unless you're using some sort of an exotic linker.

[PATCH] D51899: Remove extraneous ".a" suffix from baremetal clang_rt.builtins when compiling for baremetal.

2018-09-10 Thread George Morgan via Phabricator via cfe-commits
georgemorgan updated this revision to Diff 164776. georgemorgan added a comment. Update diff to provide context. https://reviews.llvm.org/D51899 Files: lib/Driver/ToolChains/BareMetal.cpp test/Driver/baremetal.cpp Index: test/Driver/baremetal.cpp

[PATCH] D51899: Remove extraneous ".a" suffix from baremetal clang_rt.builtins when compiling for baremetal.

2018-09-10 Thread Robert Widmann via Phabricator via cfe-commits
CodaFi added a comment. Two things: - Please re-upload this path with with context (`git diff -U9` or `arc patch`) - This is one answer, but the real problem is that this path is halfway between an absolute path and a link-relative path. We should be searching for these libraries

[PATCH] D51898: Revert "[clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer"

2018-09-10 Thread Shuai Wang via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL341886: Revert [clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer (authored by shuaiwang, committed by

[clang-tools-extra] r341886 - Revert "[clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer"

2018-09-10 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Mon Sep 10 16:58:04 2018 New Revision: 341886 URL: http://llvm.org/viewvc/llvm-project?rev=341886=rev Log: Revert "[clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer" Summary: Tests somehow break on windows (and only on windows)

[PATCH] D51898: Revert "[clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer"

2018-09-10 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 164773. shuaiwang added a comment. rebase Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51898 Files: clang-tidy/utils/ExprMutationAnalyzer.cpp unittests/clang-tidy/ExprMutationAnalyzerTest.cpp Index:

[PATCH] D51899: Remove extraneous ".a" suffix from baremetal clang_rt.builtins when compiling for baremetal.

2018-09-10 Thread George Morgan via Phabricator via cfe-commits
georgemorgan created this revision. georgemorgan added reviewers: joker-eph-DISABLED, jroelofs, harlanhaskins, CodaFi. Herald added a reviewer: javed.absar. Herald added subscribers: cfe-commits, kristina, kristof.beyls. When building for a baremetal triple an extraneous ".a" is appended to the

[PATCH] D51898: Revert "[clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer"

2018-09-10 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang created this revision. Herald added subscribers: cfe-commits, Szelethus, a.sidorin, xazax.hun. Herald added a reviewer: george.karpenkov. Tests somehow break on windows (and only on windows) http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/13003

[PATCH] D51719: Wrapped block after case label should not be merged into a single line (Bug 38854)

2018-09-10 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a reviewer: krasimir. owenpan added a comment. Can one of the reviews have a quick look at this one? Thanks! Repository: rC Clang https://reviews.llvm.org/D51719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r341877 - clang-check: rename the local FixItAction

2018-09-10 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Sep 10 15:57:26 2018 New Revision: 341877 URL: http://llvm.org/viewvc/llvm-project?rev=341877=rev Log: clang-check: rename the local FixItAction Resolve the ambiguity in the FixItAction definition by renaming the type. With Xcode 9.2, you would fail to build this

[PATCH] D51189: [Sema][ObjC] Infer availability of +new from availability of -init

2018-09-10 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341874: [Sema][ObjC] Infer availability of +new from availability of -init. (authored by epilk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r341874 - [Sema][ObjC] Infer availability of +new from availability of -init.

2018-09-10 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Mon Sep 10 15:20:09 2018 New Revision: 341874 URL: http://llvm.org/viewvc/llvm-project?rev=341874=rev Log: [Sema][ObjC] Infer availability of +new from availability of -init. When defined in NSObject, +new will call -init. If -init has been marked unavailable, diagnose uses

r341871 - Fix test regression in r341862

2018-09-10 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Mon Sep 10 14:57:53 2018 New Revision: 341871 URL: http://llvm.org/viewvc/llvm-project?rev=341871=rev Log: Fix test regression in r341862 The commit updates when AES is enabled, but failed to update the tests. This patch fixes them. Modified:

[PATCH] D51867: [Diagnostics] Add error handling to FormatDiagnostic()

2018-09-10 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. I tried to come up with some input that breaks current implementation so I could add the test. Problem is that invalid memory read doesn't guarantee deterministic crash. E. g. with this input the current implementation is definitely reading way past the buffer:

r341869 - [AST] Fix a crash on invalid.

2018-09-10 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Mon Sep 10 14:54:04 2018 New Revision: 341869 URL: http://llvm.org/viewvc/llvm-project?rev=341869=rev Log: [AST] Fix a crash on invalid. Problem was that we were appending to the source location info buffer in the copy assignment operator (instead of overwriting).

[PATCH] D51510: Move AESNI generation to Skylake and Goldmont

2018-09-10 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341862: Move AESNI generation to Skylake and Goldmont (authored by erichkeane, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r341862 - Move AESNI generation to Skylake and Goldmont

2018-09-10 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Mon Sep 10 14:12:21 2018 New Revision: 341862 URL: http://llvm.org/viewvc/llvm-project?rev=341862=rev Log: Move AESNI generation to Skylake and Goldmont The instruction set first appeared with Westmere, but not all processors in that and the next few generations have the

[PATCH] D50462: Try building complete AST after a fatal error was emitted if further diagnostics are expected

2018-09-10 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Agree that fatal/non-fatal error is too coarse and tooling/IDEs need more details and more control to provide better experience. But I don't think we are in a state to claim that all errors are recoverable (in theory and in current implementation). Instead of

[PATCH] D51189: [Sema][ObjC] Infer availability of +new from availability of -init

2018-09-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D51189 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D50814: [clangd] transfer the fixits with the notes instead of adding them to the main diagnostic if request by the client

2018-09-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D50814#1224292, @ilya-biryukov wrote: > Sorry for the delayed response. It seems we absolutely need this if mirroring > libclang is an absolute requirement. > We seem to have multiple implementation options: > > Which classes to use for

[PATCH] D51084: Implement -Watomic-implicit-seq-cst

2018-09-10 Thread JF Bastien via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC341860: Implement -Watomic-implicit-seq-cst (authored by jfb, committed by ). Changed prior to commit: https://reviews.llvm.org/D51084?vs=164235=164746#toc Repository: rC Clang

r341860 - Implement -Watomic-implicit-seq-cst

2018-09-10 Thread JF Bastien via cfe-commits
Author: jfb Date: Mon Sep 10 13:42:56 2018 New Revision: 341860 URL: http://llvm.org/viewvc/llvm-project?rev=341860=rev Log: Implement -Watomic-implicit-seq-cst Summary: _Atomic and __sync_* operations are implicitly sequentially-consistent. Some codebases want to force explicit usage of memory

[PATCH] D51650: Implement target_clones multiversioning

2018-09-10 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:961-970 if (const auto *FD = dyn_cast(ND)) if (FD->isMultiVersion() && !OmitMultiVersionMangling) { if (FD->isCPUDispatchMultiVersion() || FD->isCPUSpecificMultiVersion())

r341858 - Enhance -Wc++14-compat for class template argument deduction to list the

2018-09-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Sep 10 13:31:03 2018 New Revision: 341858 URL: http://llvm.org/viewvc/llvm-project?rev=341858=rev Log: Enhance -Wc++14-compat for class template argument deduction to list the deduced type (if known). Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D50883: [clang-tidy] Handle unique owning smart pointers in ExprMutationAnalyzer

2018-09-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Ofc the current limitation with assuming always modification stays with my proposed tests. But these are the tests we need once implemented full analysis of pointers. Comment at: unittests/clang-tidy/ExprMutationAnalyzerTest.cpp:658 +

[PATCH] D51880: [ASTMatchers] add two matchers for dependent expressions

2018-09-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Missing tests and changes to Registry.cpp for dynamic matchers. Also, do you want to add `isInstantiationDependent()` at the same time, given the relationship with the other two matchers? Comment at: include/clang/ASTMatchers/ASTMatchers.h:777

[PATCH] D51853: Merge two attribute diagnostics into one

2018-09-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D51853 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D50883: [clang-tidy] Handle unique owning smart pointers in ExprMutationAnalyzer

2018-09-10 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added a comment. In https://reviews.llvm.org/D50883#1229297, @JonasToth wrote: > > Different from std::vector::operator[] which has two overloads for const > > and non-const access, std::unique_ptr only has one const version of > > `operator->`. > > > > So for SmartPtr x; x->mf();

[PATCH] D51884: [clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR38888

2018-09-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I think you dont need tests there. Its just life insurance :) I'd stick with pointers because working with the AST always results in pointers. It is more convenient to stay in pointerland there. >> I feel that the `findMutation...` functions that take raw pointers

[clang-tools-extra] r341854 - [clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR38888

2018-09-10 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Mon Sep 10 12:59:18 2018 New Revision: 341854 URL: http://llvm.org/viewvc/llvm-project?rev=341854=rev Log: [clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR3 Summary: I have hit this the rough way, while trying to use this in D51870. There is no

[PATCH] D51884: [clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR38888

2018-09-10 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE341854: [clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR3 (authored by lebedevri, committed by ). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51884 Files:

[PATCH] D50926: [SourceManager] Extract 'findFileIDsForFile' from 'translateFile' to allow mapping from one file entry to multiple FileIDs

2018-09-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 164734. arphaman marked 3 inline comments as done. arphaman added a comment. Remove dead code for filesystem update fileID matching. Repository: rC Clang https://reviews.llvm.org/D50926 Files: include/clang/Basic/SourceManager.h

[PATCH] D50926: [SourceManager] Extract 'findFileIDsForFile' from 'translateFile' to allow mapping from one file entry to multiple FileIDs

2018-09-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Basic/SourceManager.cpp:1626 +if (FileContentCache->OrigEntry == SourceFile) { + if (Callback(FileID::get(I))) +return true; ioeric wrote: > Should we check `FileID::get(I)` is valid? That's not

[PATCH] D51884: [clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR38888

2018-09-10 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D51884#1229460, @shuaiwang wrote: > LGTM :) Thank you for the review! In https://reviews.llvm.org/D51884#1229463, @JonasToth wrote: > I feel that the `findMutation...` functions that take raw pointers should get > the assertions

[PATCH] D51884: [clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR38888

2018-09-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I am in favor of the change. I feel that the `findMutation...` functions that take raw pointers should get the assertions though, at least the ones in the public interface. Having them for the private ones won't hurt either. Repository: rCTE Clang Tools Extra

[PATCH] D51884: [clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR38888

2018-09-10 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang accepted this revision. shuaiwang added a comment. This revision is now accepted and ready to land. LGTM :) Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51884 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51884: [clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR38888

2018-09-10 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 164730. lebedev.ri marked an inline comment as done. lebedev.ri added a comment. Fixed diff. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51884 Files: clang-tidy/performance/ForRangeCopyCheck.cpp

[PATCH] D51886: [analyzer][UninitializedObjectChecker] Using the new const methods of ImmutableList

2018-09-10 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: george.karpenkov, NoQ, xazax.hun, rnkovacs. Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet, whisperity. Clang side changes to https://reviews.llvm.org/D51881. This is an improvement, and won't cause

[PATCH] D51884: [clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR38888

2018-09-10 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/utils/ExprMutationAnalyzer.cpp:209-214 - const auto MemberExprs = - match(findAll(expr(anyOf(memberExpr(hasObjectExpression(equalsNode(Exp))), - cxxDependentScopeMemberExpr( -

[PATCH] D51884: [clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR38888

2018-09-10 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: JonasToth, shuaiwang, alexfh. lebedev.ri added a project: clang-tools-extra. Herald added subscribers: Szelethus, a.sidorin, xazax.hun. Herald added a reviewer: george.karpenkov. I have hit this the rough way, while trying to use this

[PATCH] D48714: [clang-tidy] fix PR37913, templated exception factory diagnosed correctly

2018-09-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I added more testcases for templates and improved the diagnostics with notes. This includes newly discovered false positives related to uninstantiated templates. @alexfh, @hokein Would you like to see better diagnostics? Repository: rCTE Clang Tools Extra

[PATCH] D51880: [ASTMatchers] add two matchers for dependent expressions

2018-09-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth created this revision. JonasToth added reviewers: aaron.ballman, alexfh, klimek. Herald added a subscriber: cfe-commits. The new matchers can be used to check if an expression is type- or value-dependent in a templated context. These matchers are used in a clang-tidy check and

[PATCH] D48714: [clang-tidy] fix PR37913, templated exception factory diagnosed correctly

2018-09-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 164721. JonasToth added a comment. - use the global ASTMatchers for dependent expressions Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48714 Files: clang-tidy/hicpp/ExceptionBaseclassCheck.cpp

[PATCH] D50539: [VFS] Add property 'fallthrough' that controls fallback to real file system.

2018-09-10 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Rebased on top of trunk and checked that this is still working. Please take a look. https://reviews.llvm.org/D50539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D50883: [clang-tidy] Handle unique owning smart pointers in ExprMutationAnalyzer

2018-09-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a subscriber: aaron.ballman. JonasToth added a comment. > Different from std::vector::operator[] which has two overloads for const > and non-const access, std::unique_ptr only has one const version of > `operator->`. > > So for SmartPtr x; x->mf(); we only see a const

[PATCH] D50953: [clang-tidy] Handle sugared reference types in ExprMutationAnalyzer

2018-09-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. What happens to pointers in a typedef (in the sense of `*` instead of `&`)? Comment at: clang-tidy/utils/ExprMutationAnalyzer.cpp:51 const auto nonConstReferenceType = [] { - return referenceType(pointee(unless(isConstQualified(; + return

[PATCH] D51057: [analyzer][UninitializedObjectChecker] Fixed dereferencing

2018-09-10 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. I ran the checker on LLVM/Clang and grpc, and saw no crashes at all! Quite confident about the current diff. However, I'm not 100% sure it doesn't break on Objective C++ codes. Can you recommend a project like that? https://reviews.llvm.org/D51057

[PATCH] D51867: [Diagnostics] Add error handling to FormatDiagnostic()

2018-09-10 Thread Jan Korous via Phabricator via cfe-commits
jkorous planned changes to this revision. jkorous added a comment. Hi Volodymyr, Thanks for the feedback - interesting points! I see your point regarding NFC - I am going to drop it as you are right. Two things about sanitizers come to mind: 1. You'd need to guarantee that you have all

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

2018-09-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 164706. leonardchan added a comment. - Push and pop contexts for every parsed statement inside `ParseStatementOrDeclaration` instead of at the start and end of compound statements Repository: rC Clang https://reviews.llvm.org/D49511 Files:

[PATCH] D51650: Implement target_clones multiversioning

2018-09-10 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Thanks for the feedback @rsmith! I'm working through the lambda issue and a few other things, but will get to this as soon as I can. Comment at: include/clang/Basic/Attr.td:2031-2042 +mutable unsigned ActiveArgIndex = 0; +void

[PATCH] D51650: Implement target_clones multiversioning

2018-09-10 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/Attr.td:2031-2042 +mutable unsigned ActiveArgIndex = 0; +void AdvanceActiveArgIndex() const { + ++ActiveArgIndex; + while(ActiveArgIndex < featuresStrs_size()) { +if

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-09-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In https://reviews.llvm.org/D45679#1229176, @shuaiwang wrote: > I have a rough idea about how `findPointeeMutation` would look like, I'm > pretty sure I can use a lot of your help :) > My current plan: > > - Finish the few existing pending changes > - Move the

[PATCH] D50246: [RISCV] Add support for computing sysroot for riscv32-unknown-elf

2018-09-10 Thread Kristina Brooks via Phabricator via cfe-commits
kristina closed this revision. kristina added a comment. In https://reviews.llvm.org/D50246#1229191, @lebedev.ri wrote: > In https://reviews.llvm.org/D50246#1229177, @kristina wrote: > > > In https://reviews.llvm.org/D50246#1229152, @rogfer01 wrote: > > > > > Hi @kristina . > > > > > > Sure, I

[PATCH] D50892: [analyzer][UninitializedObjectChecker] Correct dynamic type is acquired for record pointees

2018-09-10 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: test/Analysis/cxx-uninitialized-object-inheritance.cpp:802 +struct DynTBase2 { + int x; // expected-note{{uninitialized field 'static_cast(this->bptr)->DynTBase2::x'}} +};

[PATCH] D50619: [clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer

2018-09-10 Thread Shuai Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE341848: [clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer (authored by shuaiwang, committed by ). Changed prior to commit: https://reviews.llvm.org/D50619?vs=160960=164704#toc

[clang-tools-extra] r341848 - [clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer

2018-09-10 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Mon Sep 10 11:05:13 2018 New Revision: 341848 URL: http://llvm.org/viewvc/llvm-project?rev=341848=rev Log: [clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer Summary: - If a function is unresolved, assume it mutates its arguments - Follow unresolved member

[PATCH] D50246: [RISCV] Add support for computing sysroot for riscv32-unknown-elf

2018-09-10 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D50246#1229177, @kristina wrote: > In https://reviews.llvm.org/D50246#1229152, @rogfer01 wrote: > > > Hi @kristina . > > > > Sure, I didn't mean to do that broader change here. Apologies if it read > > that way. > > > > Would it be

[PATCH] D50246: [RISCV] Add support for computing sysroot for riscv32-unknown-elf

2018-09-10 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. In https://reviews.llvm.org/D50246#1229152, @rogfer01 wrote: > Hi @kristina . > > Sure, I didn't mean to do that broader change here. Apologies if it read that > way. > > Would it be acceptable to add an empty `--sysroot=` to the test? I can post > the change for

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-09-10 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added a comment. I have a rough idea about how `findPointeeMutation` would look like, I'm pretty sure I can use a lot of your help :) My current plan: - Finish the few existing pending changes - Move the analyzer to `clang/lib/Analysis` (likely remove `PseudoConstantAnalysis` there

[PATCH] D51806: [clang-cl] Enable -march

2018-09-10 Thread Alexandre Ganea via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC341847: [clang-cl] Enable -march option (authored by aganea, committed by ). Repository: rC Clang https://reviews.llvm.org/D51806 Files: include/clang/Driver/Options.td test/Driver/cl-options.c

r341847 - [clang-cl] Enable -march option

2018-09-10 Thread Alexandre Ganea via cfe-commits
Author: aganea Date: Mon Sep 10 10:54:32 2018 New Revision: 341847 URL: http://llvm.org/viewvc/llvm-project?rev=341847=rev Log: [clang-cl] Enable -march option This change allows usage of -march when using the clang-cl driver. This is similar to MSVC's /arch; however -march can target precisely

RE: [PATCH] D51806: [clang-cl] Enable -march

2018-09-10 Thread Alexandre Ganea via cfe-commits
Yes, indeed. The code in clang/lib/Driver/ToolChains/Arch/X86.cpp makes that –march is always parsed, leaving out /arch unused, no matter in which order they appear. De : Nico Weber Envoyé : 10 septembre 2018 12:14 À : reviews+d51806+public+c25b17a1aa94d...@reviews.llvm.org; Senthil Kumar

[PATCH] D51867: [Diagnostics][NFC] Add error handling to FormatDiagnostic()

2018-09-10 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Regarding the asserts to catch potential problems, seems most of them are for buffer overflows. Aren't sanitizers catching those cases, specifically Address Sanitizer? I haven't checked, just seems it would be good to check buffer overflow automatically instead of

[PATCH] D50246: [RISCV] Add support for computing sysroot for riscv32-unknown-elf

2018-09-10 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 added a comment. Hi @kristina . Sure, I didn't mean to do that broader change here. Apologies if it read that way. Would it be acceptable to add an empty `--sysroot=` to the test? I can post the change for review in another diff. Thanks a lot. Repository: rC Clang

[PATCH] D51650: Implement target_clones multiversioning

2018-09-10 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Based on feedback from @rsmith I've been trying to get this to work with Lambdas like GCC does, though I'm quite confused about how to go about it here. It seems that the lambda definition call operator is deferred, however I'm having a hard time making sure that

[PATCH] D51341: [HEADER] Overloadable function candidates for half/double types

2018-09-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaOverload.cpp:6063 + // OpenCL: A candidate function that uses extentions that are not enabled or + // supported is not viable. + if (getLangOpts().OpenCL) { sidorovd wrote: > Anastasia wrote: > > I

[PATCH] D51391: [clang-cl,PCH] Add support for #pragma hdrstop

2018-09-10 Thread Mike Rice via Phabricator via cfe-commits
mikerice updated this revision to Diff 164698. mikerice marked an inline comment as done. mikerice added a comment. Updated to use two options: -pch-through-header-create and -pch-through-header-use. https://reviews.llvm.org/D51391 Files: include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D51300: [analyzer][UninitializedObjectChecker] No longer using nonloc::LazyCompoundVal

2018-09-10 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. There are some nasty environment issues I'm dealing with, so the issue is the lack of a well functioning creduce, but I'll get it done eventually. https://reviews.llvm.org/D51300 ___ cfe-commits mailing list

[PATCH] D51680: [analyzer][UninitializedObjectChecker] New flag to ignore records based on it's fields

2018-09-10 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp:468 +static bool isUnionLike(const RecordDecl *RD) { + llvm::Regex ContainsKindOrTag("[kK]ind|[tT]ag"); +

[PATCH] D51680: [analyzer][UninitializedObjectChecker] New flag to ignore records based on it's fields

2018-09-10 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 164696. Szelethus retitled this revision from "[analyzer][UninitializedObjectChecker] New flag to ignore union-like constructs" to "[analyzer][UninitializedObjectChecker] New flag to ignore records based on it's fields". Szelethus edited the summary of

[PATCH] D51354: Fix the -print-multi-directory flag to print the selected multilib.

2018-09-10 Thread Stella Stamenova via Phabricator via cfe-commits
stella.stamenova added a comment. I saw this test fail in our testing as well. I think the matches are too broad and I suspect this will fail intermittently on the bots too causing confusion: Command Output (stderr): --

[PATCH] D51416: [RTTI] Align rtti types to prevent over-alignment

2018-09-10 Thread Dave Green via Phabricator via cfe-commits
dmgreen updated this revision to Diff 164693. dmgreen added a comment. Now using getABITypeAlignment, plus added a simple test https://reviews.llvm.org/D51416 Files: lib/CodeGen/CGVTT.cpp lib/CodeGen/CGVTables.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h

[PATCH] D48581: [AArch64] Support reserving x1-7 registers.

2018-09-10 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. Thanks for the other half of this feature! Comment at: test/Driver/aarch64-fixed-x-register.c:35 +// RUN: FileCheck --check-prefix=CHECK-FIXED-X20 < %t %s

[PATCH] D51544: [OpenCL] Split opencl-c.h header

2018-09-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > With this setup, we can compile opencl-c-common.h, opencl-c-fp16.h and > opencl-c-fp64.h into PCHs with one set of extensions/OpenCL version, > and use them for any other set of extensions/OpenCL version. Clang > will detect this and throw out an error, which can

[PATCH] D50246: [RISCV] Add support for computing sysroot for riscv32-unknown-elf

2018-09-10 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. In https://reviews.llvm.org/D50246#1229068, @rogfer01 wrote: > Thanks for reopening this @kristina. > > I suggest passing `--sysroot=` to make sure we see the expected behaviour > when the sysroot is actually empty. > > Note that this would not really test the scenario

[PATCH] D51864: [Tooling] Restore working dir in ClangTool.

2018-09-10 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lg Repository: rC Clang https://reviews.llvm.org/D51864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51868: [libcxx] Build and test fixes for Windows

2018-09-10 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood created this revision. hamzasood added reviewers: rnk, EricWF, compnerd, smeenai. Herald added subscribers: cfe-commits, ldionne, mgorny. The patch fixes a few issues that arise when using libc++ on Windows. Specifically: 1. The CMake configuration added `-Wall` to the compilation,

[PATCH] D51867: [Diagnostics][NFC] Add error handling to FormatDiagnostic()

2018-09-10 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added reviewers: arphaman, vsapsai. jkorous added a project: clang. Herald added subscribers: cfe-commits, dexonsmith. There seem to be couple implicit assumptions that might be better represented explicitly by asserts. Repository: rC Clang

[PATCH] D48714: [clang-tidy] fix PR37913, templated exception factory diagnosed correctly

2018-09-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 164690. JonasToth added a comment. - Fix typedependant expressions are ignored This one took me way longer then it should have, but I discovered new templated code constructs and added test accordingly. Repository: rCTE Clang Tools Extra

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-09-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. @shuaiwang What are you working on next? Do you have an idea on how we will handle the pointee of a pointer? That would be very interesting for my const-correctness check. if you need help with anything, just say so. I would like to support Am 10.09.2018 um 18:49

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-09-10 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added a comment. In https://reviews.llvm.org/D45679#1183116, @george.karpenkov wrote: > @aaron.ballman @alexfh @shuaiwang Would it be possible to move that code into > a matcher, or into a something which could be used from Clang? We would also > like to use similar functionality,

[PATCH] D50246: [RISCV] Add support for computing sysroot for riscv32-unknown-elf

2018-09-10 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 added a comment. Thanks for reopening this @kristina. I suggest passing `--sysroot=` to make sure we see the expected behaviour when the sysroot is actually empty. Note that this would not really test the scenario where `DEFAULT_SYSROOT` is empty **and** no `--sysroot` appears in the

[PATCH] D51860: [clangd] NFC: Use uint32_t for FuzzyFindRequest limits

2018-09-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Why this change? (If you're changing it, `Optional` is probably clearer) https://reviews.llvm.org/D51860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51747: [clangd] Implement deprecation diagnostics with lower severity.

2018-09-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D51747#1228919, @ilya-biryukov wrote: > > Most of the value of adding an option is: if someone complains, we can tell > > them to go away :-) One possible corollary is: we shouldn't add the option > > until someone complains. I'm not 100%

  1   2   3   >