r311532 - [clang-format] Align trailing comments if ColumnLimit is 0

2017-08-23 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Wed Aug 23 00:18:36 2017 New Revision: 311532 URL: http://llvm.org/viewvc/llvm-project?rev=311532=rev Log: [clang-format] Align trailing comments if ColumnLimit is 0 Summary: ColumnLimit = 0 means no limit, so comment should always be aligned if requested. This was broken

Re: ps4-buildslave1a down 08.23.2017

2017-08-23 Thread Victor Leschuk via cfe-commits
ps4-buildslave1a is back. On 08/23/2017 08:49 AM, Victor Leschuk wrote: > Hello all, ps4-buildslave1a is currently down. We are detecting the > cause and will fix it ASAP. I will inform when it is accessible again. > > Sorry for the inconvenience. > -- Best Regards, Victor Leschuk | Software

[PATCH] D36685: [clang-diff] HTML diff navigation

2017-08-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. LGTM. There are some unrelated highlighting bugs in HTML though, for example if you take: before: int foo(); void bar(int x) { switch (x) { case 0: bar(2); } } after: void bar(int x) { switch (x) { case 4: bar(2);

[PATCH] D34984: Store token literal data in PCH. Avoids disk read on PreProc expansion.

2017-08-23 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 112303. v.g.vassilev added a comment. Fix StringRef allocation. https://reviews.llvm.org/D34984 Files: include/clang/Serialization/ASTReader.h lib/Serialization/ASTReader.cpp lib/Serialization/ASTWriter.cpp Index:

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

2017-08-23 Thread Roman Lebedev via cfe-commits
Since i initially forgot to include cfe-commits as a subscriber into the review, the first mail was not sent to the list. So maybe, for history and clarity, i should forward the mail to the list: (i'm keeping the reviewers as CC since phabricator, unlike github, does not add mail-based reviews as

[PATCH] D37023: [analyzer] Fix bugreporter::getDerefExpr() again.

2017-08-23 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Artem, I have a question after quick look. The original code considered `ParenExpr`s but I cannot find nothing paren-related in the patch. Is case `(x->y).z` handled as expected? https://reviews.llvm.org/D37023 ___

[PATCH] D36664: [analyzer] Make StmtDataCollector customizable

2017-08-23 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor accepted this revision. teemperor added a comment. This revision is now accepted and ready to land. Sorry for the delay, was on vacation. > Since StmtDataCollectors.inc resides in lib I have to use relative paths (so > the include directive looks different depending on the current

[PATCH] D37023: [analyzer] Fix bugreporter::getDerefExpr() again.

2017-08-23 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Yeah, line 86. https://reviews.llvm.org/D37023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37023: [analyzer] Fix bugreporter::getDerefExpr() again.

2017-08-23 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Sorry, missed that. https://reviews.llvm.org/D37023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36969: [Basic] Add a DiagnosticError llvm::ErrorInfo subclass

2017-08-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 112327. arphaman added a comment. Add helper functions as suggested by Vedant. Repository: rL LLVM https://reviews.llvm.org/D36969 Files: include/clang/Basic/DiagnosticError.h lib/Basic/Diagnostic.cpp unittests/Basic/DiagnosticTest.cpp Index:

r311523 - bpf: add -mcpu=# support for bpf

2017-08-23 Thread Yonghong Song via cfe-commits
Author: yhs Date: Tue Aug 22 21:26:17 2017 New Revision: 311523 URL: http://llvm.org/viewvc/llvm-project?rev=311523=rev Log: bpf: add -mcpu=# support for bpf -mcpu=# will support: . generic: the default insn set . v1: insn set version 1, the same as generic . v2: insn set version 2,

[PATCH] D36354: [clang-tidy] Implement type-based check for `gsl::owner`

2017-08-23 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 112336. JonasToth added a comment. - test case fixed expected warning - address review comments from aaron https://reviews.llvm.org/D36354 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp

[PATCH] D36354: [clang-tidy] Implement type-based check for `gsl::owner`

2017-08-23 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked 2 inline comments as done. JonasToth added a comment. improved structure a bit https://reviews.llvm.org/D36354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36969: [Basic] Add a DiagnosticError llvm::ErrorInfo subclass

2017-08-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked 2 inline comments as done. arphaman added a comment. In https://reviews.llvm.org/D36969#848906, @vsk wrote: > Nice! I'd like to get your thoughts on two candidate ergonomic changes: Makes sense, I've added two similar helper functions in the updated patch. Repository: rL

r311544 - Fix typos, remove unused private members of CommonOptionsParser, NFC

2017-08-23 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Wed Aug 23 03:43:26 2017 New Revision: 311544 URL: http://llvm.org/viewvc/llvm-project?rev=311544=rev Log: Fix typos, remove unused private members of CommonOptionsParser, NFC Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h

[PATCH] D35271: Fix printing policy for AST context loaded from file

2017-08-23 Thread Johann Klähn via Phabricator via cfe-commits
jklaehn updated this revision to Diff 112334. jklaehn added a comment. Update regression test to use `createTemporaryFile()` and `tool_output_file` as suggested. https://reviews.llvm.org/D35271 Files: lib/Frontend/ASTUnit.cpp unittests/Frontend/ASTUnitTest.cpp

[PATCH] D36956: [clang-format] Emit absolute splits before lines for comments

2017-08-23 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. https://reviews.llvm.org/D36956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

2017-08-23 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. ping Repository: rL LLVM https://reviews.llvm.org/D30295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2017-08-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D37014#850064, @tbourvon wrote: > In https://reviews.llvm.org/D37014#849157, @lebedev.ri wrote: > > > Please add the following test: (and make sure that it does the right thing > > :)) > > > > bool f_with_preproc_condition() { > >

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2017-08-23 Thread Tristan Bourvon via Phabricator via cfe-commits
tbourvon added a comment. In https://reviews.llvm.org/D37014#850088, @lebedev.ri wrote: > In https://reviews.llvm.org/D37014#850064, @tbourvon wrote: > > > In https://reviews.llvm.org/D37014#849157, @lebedev.ri wrote: > > > > > Please add the following test: (and make sure that it does the right

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

2017-08-23 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. yamaguchi marked an inline comment as done. Closed by commit rL311552: [Bash-autocompletion] Add support for static analyzer flags (authored by yamaguchi). Changed prior to commit:

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2017-08-23 Thread Tristan Bourvon via Phabricator via cfe-commits
tbourvon updated this revision to Diff 112351. tbourvon added a comment. Fixing the reviewers' remarks, mainly formatting and const-correctness, as well as adding a few more tests. https://reviews.llvm.org/D37014 Files: clang-tidy/readability/CMakeLists.txt

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

2017-08-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/CodeGen/CGExprComplex.cpp:163 +else + CGF.EmitLValue(ME->getBase()); +return *Constant; rjmccall wrote: > rjmccall wrote: > > There's an EmitIgnoredExpr you could use. > > > > Also, I

[PATCH] D36354: [clang-tidy] Implement type-based check for `gsl::owner`

2017-08-23 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. i think the diagnostics are better now, i added the expected and received type everywhere i could. https://reviews.llvm.org/D36354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35955: clang-format: Add preprocessor directive indentation

2017-08-23 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: unittests/Format/FormatTest.cpp:2297 + "#include \n" + "#define MACRO " + "\\\n" Please just set

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2017-08-23 Thread Tristan Bourvon via Phabricator via cfe-commits
tbourvon added a comment. In https://reviews.llvm.org/D37014#849157, @lebedev.ri wrote: > Please add the following test: (and make sure that it does the right thing :)) > > bool f_with_preproc_condition() { > auto test = 42; > assert(test == 42); > return test; > } > > > I.e. if

r311552 - [Bash-autocompletion] Add support for static analyzer flags

2017-08-23 Thread Yuka Takahashi via cfe-commits
Author: yamaguchi Date: Wed Aug 23 06:39:47 2017 New Revision: 311552 URL: http://llvm.org/viewvc/llvm-project?rev=311552=rev Log: [Bash-autocompletion] Add support for static analyzer flags Summary: This is a patch for clang autocomplete feature. It will collect values which -analyzer-checker

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2017-08-23 Thread Tristan Bourvon via Phabricator via cfe-commits
tbourvon updated this revision to Diff 112356. tbourvon marked an inline comment as done. tbourvon added a comment. Forgot to move the comments on small matchers as suggested by review. https://reviews.llvm.org/D37014 Files: clang-tidy/readability/CMakeLists.txt

[PATCH] D36354: [clang-tidy] Implement type-based check for `gsl::owner`

2017-08-23 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 112363. JonasToth marked 3 inline comments as done. JonasToth added a comment. - adjust the diagnostics to include the types https://reviews.llvm.org/D36354 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2017-08-23 Thread Tristan Bourvon via Phabricator via cfe-commits
tbourvon marked 14 inline comments as done. tbourvon added inline comments. Comment at: clang-tidy/readability/UselessIntermediateVarCheck.h:29 + : ClangTidyCheck(Name, Context), +MaximumLineLength(Options.get("MaximumLineLength", 100)) {} + void

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2017-08-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/readability/UnnecessaryIntermediateVarCheck.cpp:376 +// expression wouldn't really benefit readability. Therefore we abort. +if (NewReturnLength > MaximumLineLength) { + return; Is there

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

2017-08-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 112360. arphaman marked 2 inline comments as done. arphaman added a comment. - Create `tryEmitAsConstant` for MemberExprs and `emitConstant` helper for complex values as suggested by John. - Remove dead constant emission code from CGExprAggregate.cpp - Emit

Re: r311532 - [clang-format] Align trailing comments if ColumnLimit is 0

2017-08-23 Thread Hans Wennborg via cfe-commits
Merged to 5.0 in r311573. On Wed, Aug 23, 2017 at 12:18 AM, Krasimir Georgiev via cfe-commits wrote: > Author: krasimir > Date: Wed Aug 23 00:18:36 2017 > New Revision: 311532 > > URL: http://llvm.org/viewvc/llvm-project?rev=311532=rev > Log: > [clang-format] Align

r311569 - [analyzer] Make StmtDataCollector customizable

2017-08-23 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Wed Aug 23 09:28:26 2017 New Revision: 311569 URL: http://llvm.org/viewvc/llvm-project?rev=311569=rev Log: [analyzer] Make StmtDataCollector customizable Summary: This moves the data collection macro calls for Stmt nodes to lib/AST/StmtDataCollectors.inc Users can

[PATCH] D36664: [analyzer] Make StmtDataCollector customizable

2017-08-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311569: [analyzer] Make StmtDataCollector customizable (authored by krobelus). Changed prior to commit: https://reviews.llvm.org/D36664?vs=111317=112388#toc Repository: rL LLVM

[PATCH] D37072: [clang-diff] Properly clear the selection in HTML diff

2017-08-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311575: [clang-diff] Properly clear the selection in HTML diff (authored by krobelus). Repository: rL LLVM https://reviews.llvm.org/D37072 Files: cfe/trunk/tools/clang-diff/ClangDiff.cpp Index:

r311563 - Headers: give _Unwind_Control_Block double-word alignment

2017-08-23 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Wed Aug 23 08:35:33 2017 New Revision: 311563 URL: http://llvm.org/viewvc/llvm-project?rev=311563=rev Log: Headers: give _Unwind_Control_Block double-word alignment The C++ ABI requires that the exception object (which under AEABI is the `_Unwind_Control_Block`) is

[PATCH] D37002: [clang-diff] Treat CXXCtorInitializer as a node

2017-08-23 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, with one request below: Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:954 } - // We need to subtract 1 to get the number of descendants excluding the root. + //

[PATCH] D35271: Fix printing policy for AST context loaded from file

2017-08-23 Thread Vedant Kumar via Phabricator via cfe-commits
vsk accepted this revision. vsk added a comment. This revision is now accepted and ready to land. Thanks, LGTM! This seems like a pretty straightforward bug fix. Since it's not my usual area maybe it'd be worth waiting a day or so for more feedback. https://reviews.llvm.org/D35271

Re: r311330 - Fixed a crash on replaying Preamble's PP conditional stack.

2017-08-23 Thread Hans Wennborg via cfe-commits
Richard: ping? On Mon, Aug 21, 2017 at 1:00 PM, Hans Wennborg wrote: > Nikolai suggested this should be merged to 5.0. Richard, what do you think? > > On Mon, Aug 21, 2017 at 5:03 AM, Ilya Biryukov via cfe-commits > wrote: >> Author: ibiryukov >>

r311561 - Implement CFG construction for __try / __except / __leave.

2017-08-23 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Aug 23 08:33:16 2017 New Revision: 311561 URL: http://llvm.org/viewvc/llvm-project?rev=311561=rev Log: Implement CFG construction for __try / __except / __leave. This makes -Wunreachable-code work for programs containing SEH (except for __finally, which is still missing

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

2017-08-23 Thread Nico Weber via cfe-commits
On Tue, Aug 22, 2017 at 9:23 PM, Reid Kleckner via Phabricator via cfe-commits wrote: > rnk accepted this revision. > rnk added a comment. > This revision is now accepted and ready to land. > 311561, thanks! > Looks good! > > > > > Comment at:

[libunwind] r311562 - unwind: explicitly align `_Unwind_Control_Block`

2017-08-23 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Wed Aug 23 08:33:45 2017 New Revision: 311562 URL: http://llvm.org/viewvc/llvm-project?rev=311562=rev Log: unwind: explicitly align `_Unwind_Control_Block` The C++ ABI requires that the exception object is double-word aligned. The alignment attribute was applied to the

r311570 - [clang-diff] HTML diff navigation

2017-08-23 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Wed Aug 23 09:32:13 2017 New Revision: 311570 URL: http://llvm.org/viewvc/llvm-project?rev=311570=rev Log: [clang-diff] HTML diff navigation Summary: This adds shortcuts j and k to jump between changes. It is especially useful in diffs with few changes. Reviewers:

r311571 - [clang-diff] Reformat test, NFC

2017-08-23 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Wed Aug 23 09:32:35 2017 New Revision: 311571 URL: http://llvm.org/viewvc/llvm-project?rev=311571=rev Log: [clang-diff] Reformat test, NFC Modified: cfe/trunk/test/Tooling/clang-diff-html.test Modified: cfe/trunk/test/Tooling/clang-diff-html.test URL:

[PATCH] D36685: [clang-diff] HTML diff navigation

2017-08-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311570: [clang-diff] HTML diff navigation (authored by krobelus). Repository: rL LLVM https://reviews.llvm.org/D36685 Files: cfe/trunk/tools/clang-diff/ClangDiff.cpp Index:

r311575 - [clang-diff] Properly clear the selection in HTML diff

2017-08-23 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Wed Aug 23 09:52:15 2017 New Revision: 311575 URL: http://llvm.org/viewvc/llvm-project?rev=311575=rev Log: [clang-diff] Properly clear the selection in HTML diff Reviewers: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D37072

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

2017-08-23 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: lib/Lex/Preprocessor.cpp:746 void Preprocessor::Lex(Token ) { + llvm::TimeRegion(PPOpts->getTimer()); + MatzeB wrote: > modocache wrote: > > erik.pilkington wrote: > > > Doesn't this just start a timer and immediately end

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

2017-08-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: test/Sema/warn-unreachable-ms.c:42 + } +} rnk wrote: > rnk wrote: > > Can we add a test to exercise that this builds the right CFG? > > ``` > > __try { > > __try { > > f(); > > } __except(1) { > > __leave; //

[PATCH] D37072: [clang-diff] Properly clear the selection in HTML diff

2017-08-23 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. https://reviews.llvm.org/D37072 Files: tools/clang-diff/ClangDiff.cpp Index: tools/clang-diff/ClangDiff.cpp === --- tools/clang-diff/ClangDiff.cpp +++ tools/clang-diff/ClangDiff.cpp @@ -140,9

[PATCH] D37072: [clang-diff] Properly clear the selection in HTML diff

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

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

2017-08-23 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. Looks great, thanks. Repository: rL LLVM https://reviews.llvm.org/D36876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r311563 - Headers: give _Unwind_Control_Block double-word alignment

2017-08-23 Thread Saleem Abdulrasool via cfe-commits
Hans, Can we get this merged to the 5.0 branch as well? This corresponds to the libunwind fix for the alignment of the exception type. Thanks! On Wed, Aug 23, 2017 at 8:36 AM Saleem Abdulrasool via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: compnerd > Date: Wed Aug 23 08:35:33

[libunwind] r311574 - ARM: explicitly specify the 8-byte alignment

2017-08-23 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Wed Aug 23 09:50:27 2017 New Revision: 311574 URL: http://llvm.org/viewvc/llvm-project?rev=311574=rev Log: ARM: explicitly specify the 8-byte alignment It seems that GCC interprets `__attribute__((__aligned__))` as 8-byte alignment on ARM, but clang does not. Explicitly

r311576 - Headers: explicitly specify double-word alignment

2017-08-23 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Wed Aug 23 09:57:55 2017 New Revision: 311576 URL: http://llvm.org/viewvc/llvm-project?rev=311576=rev Log: Headers: explicitly specify double-word alignment GCC will interpret `__attribute__((__aligned__))` as 8-byte alignment on ARM, but clang will not. Explicitly

[PATCH] D36969: [Basic] Add a DiagnosticError llvm::ErrorInfo subclass

2017-08-23 Thread Vedant Kumar via Phabricator via cfe-commits
vsk accepted this revision. vsk added a comment. This revision is now accepted and ready to land. LGTM! Repository: rL LLVM https://reviews.llvm.org/D36969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37066: [clang-tidy] A follow-up fix of braced-init-list constructors in make-unique check.

2017-08-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added subscribers: xazax.hun, JDevlieghere. https://reviews.llvm.org/D37066 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp test/clang-tidy/Inputs/modernize-smart-ptr/initializer_list.h test/clang-tidy/modernize-make-unique.cpp Index:

r311566 - Revert "[clang-format] Emit absolute splits before lines for comments"

2017-08-23 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Wed Aug 23 08:58:10 2017 New Revision: 311566 URL: http://llvm.org/viewvc/llvm-project?rev=311566=rev Log: Revert "[clang-format] Emit absolute splits before lines for comments" This reverts commit r311559, which added a test containing raw string literals in macros, which

[PATCH] D37066: [clang-tidy] A follow-up fix of braced-init-list constructors in make-unique check.

2017-08-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:279 if (const auto *CE = New->getConstructExpr()) { - for (const auto *Arg : CE->arguments()) { -if (llvm::isa(Arg)) { - return false; -} + if

r311601 - Fix a bug in CGDebugInfo::EmitInlineFunctionStart causing DILocations to be

2017-08-23 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Wed Aug 23 14:24:12 2017 New Revision: 311601 URL: http://llvm.org/viewvc/llvm-project?rev=311601=rev Log: Fix a bug in CGDebugInfo::EmitInlineFunctionStart causing DILocations to be parented in function declarations. Fixes PR33997.

[PATCH] D35955: clang-format: Add preprocessor directive indentation

2017-08-23 Thread Mark Zeren via Phabricator via cfe-commits
mzeren-vmw added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:383 + Current.Previous->is(tok::hash) && State.FirstIndent > 0) { +// subtract 1 so indent lines up with non-preprocessor code +Spaces += State.FirstIndent; djasper

[PATCH] D34224: [NFC] remove trailing WS

2017-08-23 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya closed this revision. hiraditya added a comment. Closed by commit: https://reviews.llvm.org/rL311283 https://reviews.llvm.org/D34224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r311612 - Fix mangling for dependent "type { expr-list }" expressions, and add mangling for designated initializers matching recent cxx-abi-dev discussion.

2017-08-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Aug 23 15:12:08 2017 New Revision: 311612 URL: http://llvm.org/viewvc/llvm-project?rev=311612=rev Log: Fix mangling for dependent "type { expr-list }" expressions, and add mangling for designated initializers matching recent cxx-abi-dev discussion. Modified:

[PATCH] D37004: [clang-diff] Fix the html output for CXXOperatorCallExpr

2017-08-23 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 112416. johannes added a comment. provide a test need to update the maxsize parameter to -s=200 here because the test file is expected to fit within this size https://reviews.llvm.org/D37004 Files: test/Tooling/Inputs/clang-diff-basic-src.cpp

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

2017-08-23 Thread Nico Weber via cfe-commits
On Wed, Aug 23, 2017 at 12:11 PM, Reid Kleckner via Phabricator via cfe-commits wrote: > rnk added inline comments. > > > > Comment at: test/Sema/warn-unreachable-ms.c:42 > + } > +} > > rnk wrote: > > rnk wrote: > > > Can we add a

r311594 - Parse and print DIExpressions inline to ease IR and MIR testing

2017-08-23 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Aug 23 13:31:27 2017 New Revision: 311594 URL: http://llvm.org/viewvc/llvm-project?rev=311594=rev Log: Parse and print DIExpressions inline to ease IR and MIR testing Summary: Most DIExpressions are empty or very simple. When they are complex, they tend to be unique, so

[PATCH] D35782: [C++2a][Preprocessor] Implement p0306 __VA_OPT__ (Comma omission and comma deletion)

2017-08-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. This generally looks good. I have some specific ideas about moving more of the recognition of the `__VA_OPT__` `(` ... `)` pattern into `VAOptDefinitionContext`, so if you prefer you can go ahead with something like this patch and I'll do the refactoring afterwards.

r311621 - Fix ClangFormatFuzzer.

2017-08-23 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Aug 23 17:30:28 2017 New Revision: 311621 URL: http://llvm.org/viewvc/llvm-project?rev=311621=rev Log: Fix ClangFormatFuzzer. Modified: cfe/trunk/tools/clang-format/fuzzer/ClangFormatFuzzer.cpp Modified:

[PATCH] D37089: [Sema] Error out early for tags defined inside an enumeration.

2017-08-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. This fixes PR28903 by avoiding access check for inner enum constant. We are performing access check because one enum constant references another and because enum is defined in CXXRecordDecl. But access check doesn't work because FindDeclaringClass doesn't expect

[PATCH] D37091: Expose -mllvm -accurate-sample-profile to clang.

2017-08-23 Thread Dehao Chen via Phabricator via cfe-commits
danielcdh created this revision. Herald added a subscriber: sanjoy. With accurate sample profile, we can do more aggressive size optimization. For some size-critical application, this can reduce the text size by 20% https://reviews.llvm.org/D37091 Files: include/clang/Driver/Options.td

[PATCH] D37089: [Sema] Error out early for tags defined inside an enumeration.

2017-08-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. I have also considered adding tests for structs and unions defined inside an enumeration but decided it doesn't add much value, given the code is working for all TagDecl. Another option I had in mind is having a note pointing to outer enum. But the nesting is done in

r311624 - [Driver] Register effective triple before get arm float abi.

2017-08-23 Thread Leo Li via cfe-commits
Author: aoli Date: Wed Aug 23 18:51:51 2017 New Revision: 311624 URL: http://llvm.org/viewvc/llvm-project?rev=311624=rev Log: [Driver] Register effective triple before get arm float abi. Summary: We need to register effective triple before calling `getARMFloatABI`. Add missing code when

r311617 - ObjC++: decorate ObjC interfaces in MSABI properly

2017-08-23 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Wed Aug 23 15:38:58 2017 New Revision: 311617 URL: http://llvm.org/viewvc/llvm-project?rev=311617=rev Log: ObjC++: decorate ObjC interfaces in MSABI properly `id` needs to be handled specially since it is a `TypedefType` which is sugar for an `ObjCObjectPointerType` whose

[PATCH] D37091: Expose -mllvm -accurate-sample-profile to clang.

2017-08-23 Thread David Li via Phabricator via cfe-commits
davidxl added a comment. Documentation needs to be added to clang/docs/ClangCommandLineReference.rst . There probably also needs some kind of testing for the option processing: see clang_f_opts.c https://reviews.llvm.org/D37091 ___ cfe-commits

Re: r284549 - DR1330: instantiate exception-specifications when "needed". We previously did

2017-08-23 Thread Richard Smith via cfe-commits
On 23 August 2017 at 08:01, Alex L via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi Richard, > > It looks like this commit caused PR34298 (https://bugs.llvm.org/show_bu > g.cgi?id=34298). Now Clang fails to compile a libc++ std::function member > variable with an incomplete return type.

[PATCH] D15465: [git-clang-format]: New option to perform formatting against staged changes only

2017-08-23 Thread Jason Newton via Phabricator via cfe-commits
nevion added a comment. Hi - I'm coming here from Alexander's post on stackoverflow and I'm interested to see both how this solution is progressing (no replies for 1.5

[PATCH] D37090: Implement CFG construction for __finally.

2017-08-23 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. This completes CFG construction for SEH AST nodes. Also tweak test `g3` to explicitly check that `__leave` in an `__except` leaves the outer `__try`. https://reviews.llvm.org/D37090 Files: lib/Analysis/CFG.cpp test/Sema/warn-unreachable-ms.c Index:

[PATCH] D37091: Expose -mllvm -accurate-sample-profile to clang.

2017-08-23 Thread Dehao Chen via Phabricator via cfe-commits
danielcdh updated this revision to Diff 112496. danielcdh added a comment. add document and test https://reviews.llvm.org/D37091 Files: docs/ClangCommandLineReference.rst include/clang/Driver/Options.td lib/Driver/ToolChains/Clang.cpp test/Driver/clang_f_opts.c Index:

[PATCH] D37091: Expose -mllvm -accurate-sample-profile to clang.

2017-08-23 Thread David Li via Phabricator via cfe-commits
davidxl added inline comments. Comment at: docs/ClangCommandLineReference.rst:176 + +If sample profile is accurate, we will mark all un-sampled callsite as cold. Otherwise, treat un-sampled callsites as if we have no profile + If the sample profile is accurate,

r311589 - [ubsan] PR34266: When sanitizing the 'this' value for a member function that happens to be a lambda call operator, use the lambda's 'this' pointer, not the captured enclosing 'this' pointer

2017-08-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Aug 23 12:39:04 2017 New Revision: 311589 URL: http://llvm.org/viewvc/llvm-project?rev=311589=rev Log: [ubsan] PR34266: When sanitizing the 'this' value for a member function that happens to be a lambda call operator, use the lambda's 'this' pointer, not the captured

[PATCH] D37042: Teach clang to tolerate the 'p = nullptr + n' idiom used by glibc

2017-08-23 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a comment. My intention here was to make this as strict/limited as possible while still handling the cases of interest. There are two different implementations I want to handle. You can see the first variation in the __BPTR_ALIGN definition being added here:

[PATCH] D35955: clang-format: Add preprocessor directive indentation

2017-08-23 Thread Erik Uhlmann via Phabricator via cfe-commits
euhlmann added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:737 +for (auto& Line : Lines) { + if (Line.InPPDirective && Line.Level > 0) +--Line.Level; krasimir wrote: > Wouldn't this also indent lines continuing macro

[PATCH] D35955: clang-format: Add preprocessor directive indentation

2017-08-23 Thread Erik Uhlmann via Phabricator via cfe-commits
euhlmann updated this revision to Diff 112432. euhlmann marked 7 inline comments as done. euhlmann added a comment. - Swapped checks in ContinuationIndenter - Renamed `PPMaybeIncludeGuard` to `IfNdefCondition` and added comment - Added another bool member that tracks if include guard detection

[PATCH] D36642: [Lexer] Report more precise skipped regions (PR34166)

2017-08-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Lex/PPDirectives.cpp:564 + if (Callbacks) +Callbacks->SourceRangeSkipped( +SourceRange(HashToken.getLocation(), CurPPLexer->getSourceLocation())); You'd have to update the pp-tests in clang-tools-extra

[PATCH] D36642: [Lexer] Report more precise skipped regions (PR34166)

2017-08-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: test/Index/skipped-ranges.c:23 // RUN: env CINDEXTEST_SHOW_SKIPPED_RANGES=1 c-index-test -test-annotate-tokens=%s:1:1:16:1 %s | FileCheck %s -// CHECK: Skipping: [5:2 - 6:7] -// CHECK: Skipping: [8:2 - 12:7] -// CHECK: Skipping:

Re: r311330 - Fixed a crash on replaying Preamble's PP conditional stack.

2017-08-23 Thread Richard Smith via cfe-commits
LG for branch. On 23 August 2017 at 11:04, Hans Wennborg via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Richard: ping? > > On Mon, Aug 21, 2017 at 1:00 PM, Hans Wennborg wrote: > > Nikolai suggested this should be merged to 5.0. Richard, what do you > think? > > > >

[PATCH] D36712: Emit section information for extern variables

2017-08-23 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > If there is no section given explicitly, there is function > SelectSectionForGlobal that will determine the section based on the > properties of the global. If there is code that only sees the declaration, > but needs to know the section, it will get it from that

Re: r311330 - Fixed a crash on replaying Preamble's PP conditional stack.

2017-08-23 Thread Hans Wennborg via cfe-commits
Thanks! r311591. On Wed, Aug 23, 2017 at 12:42 PM, Richard Smith wrote: > LG for branch. > > On 23 August 2017 at 11:04, Hans Wennborg via cfe-commits > wrote: >> >> Richard: ping? >> >> On Mon, Aug 21, 2017 at 1:00 PM, Hans Wennborg

r311592 - [clang-proto-fuzzer] Fix clang-proto-to-cxx build.

2017-08-23 Thread Matt Morehouse via cfe-commits
Author: morehouse Date: Wed Aug 23 12:58:07 2017 New Revision: 311592 URL: http://llvm.org/viewvc/llvm-project?rev=311592=rev Log: [clang-proto-fuzzer] Fix clang-proto-to-cxx build. Modified: cfe/trunk/tools/clang-fuzzer/CMakeLists.txt

[PATCH] D37079: [Preprocessor] Correct internal token parsing of newline characters in CRLF

2017-08-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: test/Frontend/system-header-line-directive-ms-lineendings.c:1 +// RUN: %clang_cc1 %s -E -o - -I %S/Inputs -isystem %S/Inputs/SystemHeaderPrefix | FileCheck %s +#include Note: this whole file is dos line endings

[PATCH] D36794: Fixups to FE tests affected by D36793

2017-08-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. These all look good Repository: rL LLVM https://reviews.llvm.org/D36794 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34984: Store token literal data in PCH. Avoids disk read on PreProc expansion.

2017-08-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Seems reasonable to store this with the token. Do you have performance data? Comment at: include/clang/Serialization/ASTReader.h:616 + /// \brief Token literal data loaded and owned by us. + std::vector TokenLiteralDataLoaded; +

[PATCH] D36371: [Clang][x86][Inline Asm] support for GCC style inline asm - Y constraints

2017-08-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Repository: rL LLVM https://reviews.llvm.org/D36371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r309226 - Headers: improve ARM EHABI coverage of unwind.h

2017-08-23 Thread Hans Wennborg via cfe-commits
I've reverted this (along with r309327) from the 5.0 branch in r311597. On Tue, Aug 22, 2017 at 11:10 AM, Hans Wennborg wrote: > Is there a bug filed? Since this was merged to 5.0.0, I'd like to know > if we broke something and if that is something that needs to be fixed. > >

Re: r309327 - Headers: fix _Unwind_{G,S}etGR for non-EHABI targets

2017-08-23 Thread Hans Wennborg via cfe-commits
Reverted from the 5.0 branch (together with r309226) in r311597. On Thu, Jul 27, 2017 at 3:08 PM, Hans Wennborg wrote: > Merged to 5.0 in r309328. > > On Thu, Jul 27, 2017 at 2:56 PM, Saleem Abdulrasool via cfe-commits > wrote: >> Author: compnerd

[PATCH] D37079: [Preprocessor] Correct internal token parsing of newline characters in CRLF

2017-08-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. Herald added a subscriber: javed.absar. Discovered due to a goofy git setup, the test system-headerline-directive.c (and a few others) failed because the token-consumption will consume only the '\r' in CRLF, making the preprocessor's printed value give the

[PATCH] D36642: [Lexer] Report more precise skipped regions (PR34166)

2017-08-23 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I'd like to see someone more familiar with indexing comment on the effect there; otherwise LGTM. https://reviews.llvm.org/D36642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37042: Teach clang to tolerate the 'p = nullptr + n' idiom used by glibc

2017-08-23 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. I'd really like to see this done in some way such that we can issue a warning along with generating well-defined code. The warning can specifically state that the code is using an extension, etc. https://reviews.llvm.org/D37042

r311559 - [clang-format] Emit absolute splits before lines for comments

2017-08-23 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Wed Aug 23 08:16:47 2017 New Revision: 311559 URL: http://llvm.org/viewvc/llvm-project?rev=311559=rev Log: [clang-format] Emit absolute splits before lines for comments Summary: This patch makes the splits emitted for the beginning of comment lines during reformatting

[PATCH] D36956: [clang-format] Emit absolute splits before lines for comments

2017-08-23 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311559: [clang-format] Emit absolute splits before lines for comments (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D36956?vs=112147=112372#toc Repository: rL LLVM

  1   2   >