[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-08-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D36836#845417, @JonasToth wrote: > Did I run it over clang or athletic like that? I would be interested in an > overall output. No, not yet. But if it is to be enabled for LLVM repos by default, then the `Threshold` will most

[PATCH] D36882: [clang-proto-fuzzer] Allow user-specified compiler arguments.

2017-08-18 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse created this revision. Herald added subscribers: kristof.beyls, aemerson. Arguments can be specified after -ignore_remaining_args=1 to modify the compiler invocation. For example, the following command-line will fuzz LLVM with a custom optimization level and target triple:

r311186 - [SanitizerCoverage] Add stack depth tracing instrumentation.

2017-08-18 Thread Matt Morehouse via cfe-commits
Author: morehouse Date: Fri Aug 18 11:43:30 2017 New Revision: 311186 URL: http://llvm.org/viewvc/llvm-project?rev=311186=rev Log: [SanitizerCoverage] Add stack depth tracing instrumentation. Summary: Augment SanitizerCoverage to insert maximum stack depth tracing for use by libFuzzer. The new

r311178 - AMDGPU: Rename r600-mcpu.cl->amdgpu-mcpu.cl

2017-08-18 Thread Konstantin Zhuravlyov via cfe-commits
Author: kzhuravl Date: Fri Aug 18 10:29:07 2017 New Revision: 311178 URL: http://llvm.org/viewvc/llvm-project?rev=311178=rev Log: AMDGPU: Rename r600-mcpu.cl->amdgpu-mcpu.cl Added: cfe/trunk/test/Driver/amdgpu-mcpu.cl Removed: cfe/trunk/test/Driver/r600-mcpu.cl Added:

[PATCH] D36882: [clang-proto-fuzzer] Allow user-specified compiler arguments.

2017-08-18 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka accepted this revision. vitalybuka added inline comments. This revision is now accepted and ready to land. Comment at: clang/tools/clang-fuzzer/ExampleClangProtoFuzzer.cpp:33 + for (I = 1; I < *argc; I++) +if

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-08-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 111731. lebedev.ri marked 2 inline comments as done. lebedev.ri added a comment. Address review notes: - `constexpr const` -> `constexpr` - moved `test/clang-tidy/check_clang_tidy.py` changes into https://reviews.llvm.org/D36892 Repository: rL LLVM

[PATCH] D36882: [clang-proto-fuzzer] Allow user-specified compiler arguments.

2017-08-18 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311185: [clang-proto-fuzzer] Allow user-specified compiler arguments. (authored by morehouse). Changed prior to commit: https://reviews.llvm.org/D36882?vs=111713=111715#toc Repository: rL LLVM

r311185 - [clang-proto-fuzzer] Allow user-specified compiler arguments.

2017-08-18 Thread Matt Morehouse via cfe-commits
Author: morehouse Date: Fri Aug 18 11:34:39 2017 New Revision: 311185 URL: http://llvm.org/viewvc/llvm-project?rev=311185=rev Log: [clang-proto-fuzzer] Allow user-specified compiler arguments. Summary: Arguments can be specified after -ignore_remaining_args=1 to modify the compiler invocation.

[PATCH] D36855: Fixed pointer to const& member function on rvalues, P0704r1

2017-08-18 Thread Blitz Rakete via Phabricator via cfe-commits
Rakete updated this revision to Diff 111719. Rakete marked 3 inline comments as done. Rakete added a comment. Yes please. https://reviews.llvm.org/D36855 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExprCXX.cpp

Re: r311115 - PR34161: support evaluation of 'void()' expressions in C++14 onwards.

2017-08-18 Thread Hans Wennborg via cfe-commits
Merged to 5.0 in r311194. On Thu, Aug 17, 2017 at 12:35 PM, Richard Smith via cfe-commits wrote: > Author: rsmith > Date: Thu Aug 17 12:35:50 2017 > New Revision: 35 > > URL: http://llvm.org/viewvc/llvm-project?rev=35=rev > Log: > PR34161: support evaluation

Re: [libcxx] r309474 - [libc++] Hoist extern template above first use

2017-08-18 Thread Eric Fiselier via cfe-commits
I'm OK merging it then. On Fri, Aug 18, 2017 at 2:32 PM, Hans Wennborg wrote: > Eric, sounds like there are no known issues with this, then. What do > you think about merging it? > > On Thu, Aug 17, 2017 at 5:30 PM, Petr Hosek wrote: > > Confirmed, this

[PATCH] D36876: [IRGen] Evaluate constant static variables referenced through member expressions

2017-08-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGExprComplex.cpp:156 +auto Constant = tryEmitDeclRefOrMemberExprAsConstant( +ME, ME->getMemberDecl(), /*AllowSideEffects=*/true); +if (Constant) { If we can (correctly) allow side-effects in

Re: [libcxx] r309474 - [libc++] Hoist extern template above first use

2017-08-18 Thread Hans Wennborg via cfe-commits
r311197. Thanks! On Fri, Aug 18, 2017 at 1:43 PM, Eric Fiselier wrote: > I'm OK merging it then. > > On Fri, Aug 18, 2017 at 2:32 PM, Hans Wennborg wrote: >> >> Eric, sounds like there are no known issues with this, then. What do >> you think about merging it?

[libcxx] r311197 - Merging r309474:

2017-08-18 Thread Hans Wennborg via cfe-commits
Author: hans Date: Fri Aug 18 13:59:31 2017 New Revision: 311197 URL: http://llvm.org/viewvc/llvm-project?rev=311197=rev Log: Merging r309474: r309474 | smeenai | 2017-07-28 19:54:41 -0700 (Fri, 28 Jul 2017) | 9 lines

[PATCH] D36503: [libcxx] [test] Update for C++17 feature removals.

2017-08-18 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added a comment. Ping? https://reviews.llvm.org/D36503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36075: [refactor] Initial support for refactoring action rules

2017-08-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. This is great work and definitely a lot to digest! ;) Some high-level comments for the first round. In general, I really appreciate the high-level interfaces; I am just a bit concerned about the implementation which is a bit hard to follow at this point, especially

[PATCH] D36075: [refactor] Initial support for refactoring action rules

2017-08-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: include/clang/Basic/DiagnosticOr.h:40 + /// diagnostic. + DiagnosticOr(PartialDiagnosticAt Diagnostic) : HasDiagnostic(true) { +new (getDiagnosticStorage()) PartialDiagnosticAt(std::move(Diagnostic)); explicit ?

[PATCH] D36187: [clang-diff] Use the relative name for NamedDecls

2017-08-18 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 111695. johannes added a comment. only use Enums as namespace prefix in C++11 https://reviews.llvm.org/D36187 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp test/Tooling/clang-diff-ast.cpp

[PATCH] D36187: [clang-diff] Use the relative name for NamedDecls

2017-08-18 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added inline comments. Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:371 + std::string ContextPrefix; + if (auto *Namespace = dyn_cast(Context)) +ContextPrefix = Namespace->getQualifiedNameAsString(); arphaman wrote: > You don't need to check both

[PATCH] D34992: Emit static constexpr member as available_externally definition

2017-08-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. I'd like to also see a testcase for the situation where we trigger the emission of a declaration with an `available_externally` definition and then find we need to promote it to a "full"

[PATCH] D36851: [analyzer] Fix modeling of ctors

2017-08-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311182: [analyzer] Fix modeling of constructors (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D36851?vs=111622=111711#toc Repository: rL LLVM

r311182 - [analyzer] Fix modeling of constructors

2017-08-18 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Fri Aug 18 11:20:43 2017 New Revision: 311182 URL: http://llvm.org/viewvc/llvm-project?rev=311182=rev Log: [analyzer] Fix modeling of constructors This diff fixes analyzer's crash (triggered assert) on the newly added test case. The assert being discussed is

[PATCH] D36853: [Parser] Correct initalizer typos before lambda capture type is deduced.

2017-08-18 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 111716. vsapsai added a comment. Address review comments. Moved `CorrectDelayedTyposInExpr` according to review comment and added mentioned test case. Removed the assertion as it didn't catch the expression ParenListExpr 0x7f8297060e40 'NULL TYPE'

[PATCH] D36892: [clang-tidy] check_clang_tidy.py: support CHECK-NOTES prefix

2017-08-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added a project: clang-tools-extra. Herald added subscribers: xazax.hun, JDevlieghere. Currently, there is two configured prefixes: `CHECK-FIXES` and `CHECK-MESSAGES` `CHECK-MESSAGES` checks that there are no test output lines with `warning:|error:`,

[PATCH] D36839: [SanitizerCoverage] Add stack depth tracing instrumentation.

2017-08-18 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311186: [SanitizerCoverage] Add stack depth tracing instrumentation. (authored by morehouse). Changed prior to commit: https://reviews.llvm.org/D36839?vs=111570=111718#toc Repository: rL LLVM

[PATCH] D36855: Fixed pointer to const& member function on rvalues, P0704r1

2017-08-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Thanks, will you need someone to commit this for you? Comment at: include/clang/Basic/DiagnosticGroups.td:794 +// earlier C++ versions. +def CXX20 : DiagGroup<"c++20-extensions">; + We've historically avoided using precise year numbers

[PATCH] D36882: [clang-proto-fuzzer] Allow user-specified compiler arguments.

2017-08-18 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 111713. morehouse added a comment. - Refactor and use strcmp. https://reviews.llvm.org/D36882 Files: clang/tools/clang-fuzzer/ExampleClangProtoFuzzer.cpp Index: clang/tools/clang-fuzzer/ExampleClangProtoFuzzer.cpp

r311191 - [Sema] Don't emit -Wunguarded-availability for switch cases

2017-08-18 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Fri Aug 18 13:20:56 2017 New Revision: 311191 URL: http://llvm.org/viewvc/llvm-project?rev=311191=rev Log: [Sema] Don't emit -Wunguarded-availability for switch cases This made it awkward to switch over an enum where some entries are partial and is unlikley to catch any bugs.

[PATCH] D36777: [Sema] Don't emit -Wunguarded-availability for switch cases

2017-08-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311191: [Sema] Don't emit -Wunguarded-availability for switch cases (authored by epilk). Changed prior to commit: https://reviews.llvm.org/D36777?vs=111528=111727#toc Repository: rL LLVM

Re: [libcxx] r309474 - [libc++] Hoist extern template above first use

2017-08-18 Thread Hans Wennborg via cfe-commits
Eric, sounds like there are no known issues with this, then. What do you think about merging it? On Thu, Aug 17, 2017 at 5:30 PM, Petr Hosek wrote: > Confirmed, this changes is harmless. The failure we're seeing seems to have > been introduced by Clang in r310983, sorry

[PATCH] D36492: [time-report] Add preprocessor timer

2017-08-18 Thread Eddie Elizondo via Phabricator via cfe-commits
eduardo-elizondo added inline comments. Comment at: include/clang/Lex/PreprocessorOptions.h:165 public: - PreprocessorOptions() : UsePredefines(true), DetailedRecord(false), + PreprocessorOptions() : PPTimer("preprocessor", "Preprocessing"), +

r311200 - [clang-diff] Move printing of matches and changes to clang-diff

2017-08-18 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Fri Aug 18 14:26:34 2017 New Revision: 311200 URL: http://llvm.org/viewvc/llvm-project?rev=311200=rev Log: [clang-diff] Move printing of matches and changes to clang-diff Summary: This also changes the output order of the changes. Now the matches are printed in pre-order,

r311199 - [clang-diff] Move the JSON export function to clang-diff

2017-08-18 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Fri Aug 18 14:26:13 2017 New Revision: 311199 URL: http://llvm.org/viewvc/llvm-project?rev=311199=rev Log: [clang-diff] Move the JSON export function to clang-diff Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36178 Added:

Re: r296861 - [PowerPC] Enable -fomit-frame-pointer by default for PPC

2017-08-18 Thread Hans Wennborg via cfe-commits
Should we add a mention of this to the release notes? On Fri, Mar 3, 2017 at 1:49 AM, Nemanja Ivanovic via cfe-commits wrote: > Author: nemanjai > Date: Fri Mar 3 03:49:17 2017 > New Revision: 296861 > > URL: http://llvm.org/viewvc/llvm-project?rev=296861=rev > Log:

r311211 - Revert "[clang-diff] Move the JSON export function to clang-diff"

2017-08-18 Thread Vlad Tsyrklevich via cfe-commits
Author: vlad.tsyrklevich Date: Fri Aug 18 16:21:11 2017 New Revision: 311211 URL: http://llvm.org/viewvc/llvm-project?rev=311211=rev Log: Revert "[clang-diff] Move the JSON export function to clang-diff" This reverts commit r311199, it was causing widespread build failures. Removed:

[PATCH] D36860: [Driver] Recognize DevDiv internal builds of MSVC, with a different directory structure

2017-08-18 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT updated this revision to Diff 111776. STL_MSFT edited the summary of this revision. STL_MSFT added a comment. This addresses Don Hinton's feedback. It also unifies `IsVS2017OrNewer` and `IsDevDivInternal` into a 3-state `enum class ToolsetLayout`. https://reviews.llvm.org/D36860

[PATCH] D36915: [Sema] Diagnose local variables and parameters captured by lambda and block expressions in a default argument

2017-08-18 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. This patch fixes an assertion failure that occurs when compiling the following invalid code: struct S { template S(T &&) {} }; template void foo1(int a0, S a1 = [](){ (void) } ) { // a0 cannot be used in the default argument for a1 }

[PATCH] D36914: Implement CFG construction for __try / __except / __leave.

2017-08-18 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. This makes -Wunreachable-code work for programs containing SEH (except for __finally, which is still missing for now). __try is modeled like try (but simpler since it can only have a single __except or __finally), __except is fairly similar to catch (but simpler,

r311222 - Revert "Revert "[clang-diff] Move printing of matches and changes to clang-diff""

2017-08-18 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Fri Aug 18 19:56:35 2017 New Revision: 311222 URL: http://llvm.org/viewvc/llvm-project?rev=311222=rev Log: Revert "Revert "[clang-diff] Move printing of matches and changes to clang-diff"" Fix build by renaming ChangeKind -> Change This reverts commit

[PATCH] D36860: [Driver] Recognize DevDiv internal builds of MSVC, with a different directory structure

2017-08-18 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT marked an inline comment as done. STL_MSFT added a comment. In https://reviews.llvm.org/D36860#845469, @thakis wrote: > This approach looks good to me. Thanks! > Is there any chance we could have a test for this? Unfortunately, testing this involves having a VS toolset with the

r311220 - [clang-diff] Fix test for python 3

2017-08-18 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Fri Aug 18 18:34:24 2017 New Revision: 311220 URL: http://llvm.org/viewvc/llvm-project?rev=311220=rev Log: [clang-diff] Fix test for python 3 Modified: cfe/trunk/test/Tooling/clang-diff-json.cpp Modified: cfe/trunk/test/Tooling/clang-diff-json.cpp URL:

Re: r292458 - Add -fdebug-info-for-profiling to emit more debug info for sample pgo profile collection

2017-08-18 Thread Hans Wennborg via cfe-commits
Should we mention this in the release notes? Is the flag documented somewhere? On Wed, Jan 18, 2017 at 4:44 PM, Dehao Chen via cfe-commits wrote: > Author: dehao > Date: Wed Jan 18 18:44:21 2017 > New Revision: 292458 > > URL:

[PATCH] D36860: [Driver] Recognize DevDiv internal builds of MSVC, with a different directory structure

2017-08-18 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. This revision is now accepted and ready to land. Many driver tests check in a basic representative directory structure (e.g. test/Driver/Inputs/basic_freebsd_tree/ and its many siblings). But if you're happy with others breaking this code,

Re: r292458 - Add -fdebug-info-for-profiling to emit more debug info for sample pgo profile collection

2017-08-18 Thread Dehao Chen via cfe-commits
On Fri, Aug 18, 2017 at 2:46 PM, Hans Wennborg wrote: > Should we mention this in the release notes? > Is the flag documented somewhere? > It's documented in the Options.td file, do you think there are other documents that need to be added/updated? Thanks, Dehao > > On

[PATCH] D36860: [Driver] Recognize DevDiv internal builds of MSVC, with a different directory structure

2017-08-18 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added a comment. In https://reviews.llvm.org/D36860#846232, @thakis wrote: > Many driver tests check in a basic representative directory structure (e.g. > test/Driver/Inputs/basic_freebsd_tree/ and its many siblings). > > But if you're happy with others breaking this code, I suppose

[PATCH] D36179: [clang-diff] Move printing of matches and changes to clang-diff

2017-08-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311200: [clang-diff] Move printing of matches and changes to clang-diff (authored by krobelus). Repository: rL LLVM https://reviews.llvm.org/D36179 Files:

[PATCH] D36178: [clang-diff] Move the JSON export function to clang-diff

2017-08-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311199: [clang-diff] Move the JSON export function to clang-diff (authored by krobelus). Repository: rL LLVM https://reviews.llvm.org/D36178 Files: cfe/trunk/include/clang/Tooling/ASTDiff/ASTDiff.h

r311216 - Revert "Revert "[clang-diff] Move the JSON export function to clang-diff""

2017-08-18 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Fri Aug 18 17:57:38 2017 New Revision: 311216 URL: http://llvm.org/viewvc/llvm-project?rev=311216=rev Log: Revert "Revert "[clang-diff] Move the JSON export function to clang-diff"" This reverts commit eac4c13ac9ea8f12bc049e040c7b9c8a517f54e7, the original commit *should*

[PATCH] D36855: Fixed pointer to const& member function on rvalues, P0704r1

2017-08-18 Thread Blitz Rakete via Phabricator via cfe-commits
Rakete updated this revision to Diff 111801. https://reviews.llvm.org/D36855 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExprCXX.cpp test/SemaCXX/cxx2a-pointer-to-const-ref-member.cpp Index: test/SemaCXX/cxx2a-pointer-to-const-ref-member.cpp

[PATCH] D36572: Implemented P0409R2 - Allow lambda capture [=, this]

2017-08-18 Thread Faisal Vali via Phabricator via cfe-commits
faisalv closed this revision. faisalv added a comment. Committed as r311224, on behalf of Hamza. https://reviews.llvm.org/rL311224 https://reviews.llvm.org/D36572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36855: Fixed pointer to const& member function on rvalues, P0704r1

2017-08-18 Thread Blitz Rakete via Phabricator via cfe-commits
Rakete updated this revision to Diff 111800. Rakete added a comment. Rebased because another commit already added the definitions of the C++20 groups. https://reviews.llvm.org/D36855 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExprCXX.cpp

[PATCH] D36820: [Bash-autocompletion] Add support for -std=

2017-08-18 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added inline comments. Comment at: llvm/utils/TableGen/OptParserEmitter.cpp:319-320 OS << ", Values);\n"; OS << "(void)ValuesWereAdded;\nassert(ValuesWereAdded &&"; OS << " \"Couldn't add values to OptTable!\");\n"; }

[PATCH] D36820: [Bash-autocompletion] Add support for -std=

2017-08-18 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 111804. yamaguchi added a comment. Update diff. Thank you for your comments! https://reviews.llvm.org/D36820 Files: clang/include/clang/Driver/Options.td clang/test/Driver/autocomplete.c llvm/utils/TableGen/OptParserEmitter.cpp Index:

[PATCH] D36918: [Sema] Take into account the current context when checking the accessibility of a member function pointer

2017-08-18 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 111805. ahatanak added a comment. Test access to protected member functions. https://reviews.llvm.org/D36918 Files: lib/Sema/SemaAccess.cpp test/SemaCXX/access.cpp Index: test/SemaCXX/access.cpp

[PATCH] D36782: [Bash-autocompletion] Add support for static analyzer flags

2017-08-18 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added a comment. @ruiu I addressed your comments in https://reviews.llvm.org/D36820, so please take a look at it. Thank you! https://reviews.llvm.org/D36782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36918: [Sema] Take into account the current context when checking the accessibility of a member function pointer

2017-08-18 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. Sema::CheckAddressOfMemberAccess was disregarding the context in which the member pointer was referenced. This patch fixes PR32898. rdar://problem/33737747 https://reviews.llvm.org/D36918 Files: lib/Sema/SemaAccess.cpp test/SemaCXX/access.cpp Index:

[PATCH] D35564: Suppress -pedantic warnings about GNU extension StmtExpr in glibc's assert macro

2017-08-18 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg updated this revision to Diff 111634. sberg added a comment. (the original diff had inadvertently lacked full -U99 context; uploaded a new diff) https://reviews.llvm.org/D35564 Files: clang/lib/Basic/DiagnosticIDs.cpp clang/test/SemaCXX/warn-sysheader-macro.cpp Index:

[PATCH] D36851: [analyzer] Fix modeling of ctors

2017-08-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 111622. alexshap added a comment. Skip the default binding for empty bases. Repository: rL LLVM https://reviews.llvm.org/D36851 Files: lib/StaticAnalyzer/Core/RegionStore.cpp test/Analysis/ctor.mm Index: test/Analysis/ctor.mm

[PATCH] D35562: Support GNU extension StmtExpr in constexpr function

2017-08-18 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg updated this revision to Diff 111632. sberg added a comment. (the original diff had inadvertently lacked full -U99 context; uploaded a new diff) https://reviews.llvm.org/D35562 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/constant-expression-cxx1y.cpp Index:

[PATCH] D36851: [analyzer] Fix modeling of ctors

2017-08-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Yeah, thanks! After the FIXME about record layout is addressed, i guess the next action item is to make sure the trivial constructor for the empty base is not evaluated conservatively (doh!).

[PATCH] D36075: [refactor] Initial support for refactoring action rules

2017-08-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Ping. Repository: rL LLVM https://reviews.llvm.org/D36075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36390: Fix overloaded static functions in SemaCodeComplete

2017-08-18 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 111647. yvvan marked 5 inline comments as done. yvvan added a comment. Review comments + solved https://bugs.llvm.org/show_bug.cgi?id=34207 issue. I've also added the extra test for that issue https://reviews.llvm.org/D36390 Files:

[PATCH] D36458: Fix crash when current lexer is nullptr

2017-08-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Parse/Parser.cpp:519 ConsumeToken(); - - PP.replayPreambleConditionalStack(); + if (!PP.isCurrentLexer(nullptr)) +PP.replayPreambleConditionalStack(); ilya-biryukov wrote: > This certainly fixes the

[PATCH] D36777: [Sema] Don't emit -Wunguarded-availability for switch cases

2017-08-18 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/D36777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34992: Emit static constexpr member as available_externally definition

2017-08-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. FYI, this doesn't compiler after John's constant emitter refactoring (r310964) https://reviews.llvm.org/D34992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36731: [ARM][AArch64] Cortex-A75 and Cortex-A55 support

2017-08-18 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. "They also implement the RCpc AArch64 extension from ARMv8.3-A." Perhaps you need to explain why a v8.2 core implements a v8.3 extension? Comment at: lib/Driver/ToolChains/Arch/ARM.cpp:92 + std::vector ) { +

[PATCH] D36458: Fix crash when current lexer is nullptr

2017-08-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I've also stumbled upon this crash. Here is an even simpler repro that crashes for me (does not involve includes): #ifndef HEADER_GUARD #define FOO(X) int fhjdfhsdjkfhjkshfjk; FOO(base) struct X { int a; }; int test() { X v; v. }

[PATCH] D36731: [ARM][AArch64] Cortex-A75 and Cortex-A55 support

2017-08-18 Thread Renato Golin via Phabricator via cfe-commits
rengolin added a comment. This change seems to have nothing to do with adding core support but exposing features from CPU names. If this was required to "support" the new cores in Clang, why wasn't it needed before? If this is a new, more generic way, of getting support, shouldn't you remove

[PATCH] D36731: [ARM][AArch64] Cortex-A75 and Cortex-A55 support

2017-08-18 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. Ah, my message crossed with Renato's; I only noticed it after submitting mine (looks like we agree though:-)) https://reviews.llvm.org/D36731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36731: [ARM][AArch64] Cortex-A75 and Cortex-A55 tests

2017-08-18 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer accepted this revision. SjoerdMeijer added a comment. This revision is now accepted and ready to land. Looks good to me too. Two nits (no new review required): one is inlined, and the other one in the summary: ARMv8.2-A => Armv8.2-A :-/ Comment at:

[PATCH] D36857: [Driver] Set linkPath and MSVT version when cl.exe is detected, plus STL's hacking.

2017-08-18 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: lib/Driver/ToolChains/MSVC.cpp:135 + llvm::SmallString<256> TestPath = PathEntry; + while(!TestPath.empty()) { TestPath = llvm::sys::path::parent_path(TestPath); Having a while loop going up the

[PATCH] D36857: [Driver] Set linkPath and MSVT version when cl.exe is detected, plus STL's hacking.

2017-08-18 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Oh, I guess this is superseded by https://reviews.llvm.org/D36860 ? https://reviews.llvm.org/D36857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36876: [IRGen] Evaluate constant static variables referenced through member expressions

2017-08-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. C++ allows us to reference static variables through member expressions. Prior to this patch, non-integer static variables that were referenced using a member expression were always emitted using lvalue loads. The old behaviour introduced an inconsistency between

[PATCH] D36860: [Driver] Recognize DevDiv internal builds of MSVC, with a different directory structure

2017-08-18 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. Looks good, but I'll defer to the owners. Minor nit... Comment at: lib/Driver/ToolChains/MSVC.cpp:142 return true; +} else if (llvm::sys::path::filename(ParentPath) == "x86ret" +|| llvm::sys::path::filename(ParentPath)

[PATCH] D36860: [Driver] Recognize DevDiv internal builds of MSVC, with a different directory structure

2017-08-18 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This approach looks good to me. Is there any chance we could have a test for this? See `test/Driver` for examples; use `python bin\llvm-lit.py ../llvm/tools/clang/test/Driver/my_test.cpp` to run a single test, `ninja check-clang` to run all of them. You need some unix

[PATCH] D36857: [Driver] Set linkPath and MSVT version when cl.exe is detected, plus STL's hacking.

2017-08-18 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. In https://reviews.llvm.org/D36857#845465, @thakis wrote: > Oh, I guess this is superseded by https://reviews.llvm.org/D36860 ? Yes, please ignore this patch -- it was just for brainstorming... ;-) Comment at: lib/Driver/ToolChains/MSVC.cpp:135 +

[PATCH] D36731: [ARM][AArch64] Cortex-A75 and Cortex-A55 tests

2017-08-18 Thread Sam Parker via Phabricator via cfe-commits
samparker updated this revision to Diff 111664. samparker added a comment. Reverted the default cpu v8.2-a to generic, I will update https://reviews.llvm.org/D36667 accordingly. Also fixed up the boolean issues. https://reviews.llvm.org/D36731 Files: lib/Driver/ToolChains/Arch/ARM.cpp

[PATCH] D36527: Implemented P0428R2 - Familiar template syntax for generic lambdas

2017-08-18 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood added inline comments. Comment at: lib/Parse/ParseExprCXX.cpp:1112 + ParseScope TemplateParamScope(this, Scope::TemplateParamScope); + if (getLangOpts().CPlusPlus2a && Tok.is(tok::less)) { faisalv wrote: > We always create a template parameter

[PATCH] D36731: [ARM][AArch64] Cortex-A75 and Cortex-A55 tests

2017-08-18 Thread Renato Golin via Phabricator via cfe-commits
rengolin added a comment. I'm happy with the patch, but I'll let @SjoerdMeijer approve. https://reviews.llvm.org/D36731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-08-18 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Did I run it over clang or athletic like that? I would be interested in an overall output. I added my thoughts. This check seems very valuable. Comment at: clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp:23 + // Limit of 25 is the

[PATCH] D35355: Fix templated type alias completion when using global completion cache

2017-08-18 Thread Erik Verbruggen via Phabricator via cfe-commits
erikjv added a comment. I'll commit it, probably next Tuesday. https://reviews.llvm.org/D35355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36731: [ARM][AArch64] Cortex-A75 and Cortex-A55 tests

2017-08-18 Thread Sam Parker via Phabricator via cfe-commits
samparker added a comment. Thanks guys, I will sort my logic out. Renato, the new Decode function is really just there to allow me to double check the target features. This is already possible with AArch64 and it just felt right to also be able to test ARM in the same way. I've renamed the

[PATCH] D36872: Fixed a crash on replaying Preamble's PP conditional stack.

2017-08-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. The crash occurs when the first token after a preamble is a macro expansion. Fixed by moving replayPreambleConditionalStack from Parser into Preprocessor. It is now called right after the predefines file is processed. https://reviews.llvm.org/D36872 Files:

[PATCH] D36872: Fixed a crash on replaying Preamble's PP conditional stack.

2017-08-18 Thread Erik Verbruggen via Phabricator via cfe-commits
erikjv added a comment. Can you check if the example in https://bugs.llvm.org/show_bug.cgi?id=33574 works correctly? Comment at: include/clang/Lex/Preprocessor.h:2029 + private: // Macro handling. Duplicate "private:" https://reviews.llvm.org/D36872

[PATCH] D36458: Fix crash when current lexer is nullptr

2017-08-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Here's an alternative fix that moves the `replay...` call into `Preprocessor`: https://reviews.llvm.org/D36872. It also fixes the crash and doesn't add invalid compiler errors about non-matching `#ifdefs`. https://reviews.llvm.org/D36458

[libcxx] r311156 - Spelling

2017-08-18 Thread Joerg Sonnenberger via cfe-commits
Author: joerg Date: Fri Aug 18 05:57:36 2017 New Revision: 311156 URL: http://llvm.org/viewvc/llvm-project?rev=311156=rev Log: Spelling Modified: libcxx/trunk/include/__tree Modified: libcxx/trunk/include/__tree URL:

[PATCH] D36187: [clang-diff] Use the relative name for NamedDecls

2017-08-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:371 + std::string ContextPrefix; + if (auto *Namespace = dyn_cast(Context)) +ContextPrefix = Namespace->getQualifiedNameAsString(); You don't need to check both `NamespaceDecl` and

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-08-18 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 111675. Nebiroth added a comment. Fixed more diff comments. https://reviews.llvm.org/D36150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/ProtocolHandlers.cpp clangd/ProtocolHandlers.h Index:

[PATCH] D36872: Fixed a crash on replaying Preamble's PP conditional stack.

2017-08-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 111676. ilya-biryukov added a comment. - Removed redundant 'private' specifier. - Added a test for https://bugs.llvm.org/show_bug.cgi?id=33574 https://reviews.llvm.org/D36872 Files: include/clang/Lex/Preprocessor.h lib/Lex/PPLexerChange.cpp

[PATCH] D36527: Implemented P0428R2 - Familiar template syntax for generic lambdas

2017-08-18 Thread Faisal Vali via Phabricator via cfe-commits
faisalv added inline comments. Comment at: lib/Parse/ParseExprCXX.cpp:1112 + ParseScope TemplateParamScope(this, Scope::TemplateParamScope); + if (getLangOpts().CPlusPlus2a && Tok.is(tok::less)) { hamzasood wrote: > faisalv wrote: > > We always create a

[PATCH] D36872: Fixed a crash on replaying Preamble's PP conditional stack.

2017-08-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. In https://reviews.llvm.org/D36872#845364, @erikjv wrote: > Can you check if the example in https://bugs.llvm.org/show_bug.cgi?id=33574 > works correctly? Works correctly, added an extra test for it.

[PATCH] D36853: [Parser] Correct initalizer typos before lambda capture type is deduced.

2017-08-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. There's also a crash with the `( ... )` initializer: namespace init_capture_undeclared_identifier { auto a = [x = y]{}; int typo_foo; auto b = [x (typo_boo )]{}; } I think you should move the added correction code before `if (Init.isUsable())` to

[PATCH] D36572: Implemented P0409R2 - Allow lambda capture [=, this]

2017-08-18 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood updated this revision to Diff 111681. hamzasood added a comment. It's Friday, so hopefully this is good to go. I don't have svn access, so could someone commit this for me? I've updated the patch so that it can be applied successfully to the latest revision. I've also renamed

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-08-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clangd/ClangdServer.cpp:296 + + const int sourceSize = sizeof(DEFAULT_SOURCE_EXTENSIONS) / sizeof(DEFAULT_SOURCE_EXTENSIONS[0]); + const int headerSize = sizeof(DEFAULT_HEADER_EXTENSIONS) / sizeof(DEFAULT_HEADER_EXTENSIONS[0]);

[PATCH] D36272: [CodeGen][x86_64] Enable 'force_align_arg_pointer' attribute at x86_64

2017-08-18 Thread Anatol Pomozov via Phabricator via cfe-commits
anatol.pomozov added a comment. Tim, had you chance to look at this patch? Repository: rL LLVM https://reviews.llvm.org/D36272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r311173 - [clang-diff] Add commandline arguments.

2017-08-18 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Fri Aug 18 09:34:22 2017 New Revision: 311173 URL: http://llvm.org/viewvc/llvm-project?rev=311173=rev Log: [clang-diff] Add commandline arguments. Summary: Support command line options for build path and extra arguments This emulates the options accepted by clang tools

r311172 - [clang-diff] Fix some errors and inconsistencies

2017-08-18 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Fri Aug 18 09:34:15 2017 New Revision: 311172 URL: http://llvm.org/viewvc/llvm-project?rev=311172=rev Log: [clang-diff] Fix some errors and inconsistencies Fix to the computation of the rightmost descendant. Prevents root nodes from being mapped if they are already

[PATCH] D36177: [clang-diff] Add commandline arguments.

2017-08-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311173: [clang-diff] Add commandline arguments. (authored by krobelus). Changed prior to commit: https://reviews.llvm.org/D36177?vs=109502=111690#toc Repository: rL LLVM

[PATCH] D36176: [clang-diff] Fix some errors and inconsistencies

2017-08-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311172: [clang-diff] Fix some errors and inconsistencies (authored by krobelus). Repository: rL LLVM https://reviews.llvm.org/D36176 Files: cfe/trunk/include/clang/Tooling/ASTDiff/ASTDiff.h