[PATCH] D30534: [analyzer] When creating a temporary object copy, properly copy the value into it.

2017-03-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Artem! Thank you for this patch. It looks very promising, but I have some questions and remarks. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:187 const Expr *Result) { - SVal V = State->getSVal(Ex,

[clang-tools-extra] r296858 - [clang-tidy] google-readability-casting: don't use constructor call syntax for const types

2017-03-03 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Mar 3 02:18:49 2017 New Revision: 296858 URL: http://llvm.org/viewvc/llvm-project?rev=296858&view=rev Log: [clang-tidy] google-readability-casting: don't use constructor call syntax for const types Modified: clang-tools-extra/trunk/clang-tidy/google/AvoidCStyleCasts

[PATCH] D30487: ClangFormat - Add option to break before inheritance separation operator in class declaration

2017-03-03 Thread Andi via Phabricator via cfe-commits
Abpostelnicu added inline comments. Comment at: include/clang/Format/Format.h:309 + /// inheritance. + bool BreakInhertianceBeforeColonAndComma; + djasper wrote: > Hm. I am still not sure about this flag and it's name. Fundamentally, this is > currently cont

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. Herald added a subscriber: JDevlieghere. Add -format option (disabled by default for now) to trigger formatting of replacements. https://reviews.llvm.org/D30564 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/tool/ClangTidyMain.cpp docs/Re

[PATCH] D28297: [StaticAnalyzer] Fix crash in CastToStructChecker

2017-03-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Looks like a right fix. Comment at: lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp:93 // Warn when there is widening cast. unsigned ToWidth = Ctx.getTypeInfo(ToPointeeTy).Width; NoQ wrote: > I think we should move the

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: test/clang-tidy/readability-braces-around-statements-format.cpp:1 +// RUN: %check_clang_tidy %s readability-braces-around-statements %t -- -format -- + Will clang-tidy look for a .clang-format file? Does this te

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh updated this revision to Diff 90442. alexfh added a comment. Pacify llvm::Expected<> debug checks. https://reviews.llvm.org/D30564 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/tool/ClangTidyMain.cpp docs/ReleaseNotes.rst docs/clang-tidy/index.rst test/cla

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: test/clang-tidy/readability-braces-around-statements-format.cpp:1 +// RUN: %check_clang_tidy %s readability-braces-around-statements %t -- -format -- + malcolm.parsons wrote: > Will clang-tidy look for a .clang-format fi

[PATCH] D30565: [analyzer] Terminate analysis on OpenMP code instead of crashing

2017-03-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin created this revision. ExprEngine assumes that OpenMP statements should never appear in CFG. However, current CFG doesn't know anything about OpenMP and passes such statements as CFG nodes causing "UNREACHABLE executed!" crashes. Since I have no ideas on OpenMP implementation in ExprE

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added inline comments. Comment at: docs/clang-tidy/index.rst:184 -p= - Build path +-quiet - + Run clang-tidy in quiet mode. This suppresses This looks like a separate patch?

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh marked an inline comment as done. alexfh added inline comments. Comment at: docs/clang-tidy/index.rst:184 -p= - Build path +-quiet - + Run clang-tidy in quiet mode. This suppresses -

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Hm. I don't actually know whether these examples are useful as is. You only present one setting of the value in most cases. What's interesting is actually how the flag changes the behavior. I mean in most cases, this can be derived from the example, but in those cases,

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. I see a lot of values in examples. If I started this review, it is because I was lost in all the options and could not find what I was looking for. If you want, I can update the example to provide results with and without the option. like > With SpacesInCStyle

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

2017-03-03 Thread Nemanja Ivanovic via cfe-commits
Author: nemanjai Date: Fri Mar 3 03:49:17 2017 New Revision: 296861 URL: http://llvm.org/viewvc/llvm-project?rev=296861&view=rev Log: [PowerPC] Enable -fomit-frame-pointer by default for PPC As is the case on platforms like Mips, X86 and SystemZ, the -fomit-frame-pointer should be enabled by def

[PATCH] D29750: [PPC] Enable -fomit-frame-pointer by default for PPC

2017-03-03 Thread Nemanja Ivanovic via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL296861: [PowerPC] Enable -fomit-frame-pointer by default for PPC (authored by nemanjai). Changed prior to commit: https://reviews.llvm.org/D29750?vs=87821&id=90443#toc Repository: rL LLVM https://re

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Sure, then go ahead. If these examples would have helped you, that's one datapoint :). As for presenting the difference in options, that would be useful I think. So if you are up to also doing that, that'd be appreciated. For bool options it seems easiest to do somethin

[PATCH] D30487: ClangFormat - Add option to break before inheritance separation operator in class declaration

2017-03-03 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: include/clang/Format/Format.h:309 + /// inheritance. + bool BreakInhertianceBeforeColonAndComma; + Abpostelnicu wrote: > djasper wrote: > > Hm. I am still not sure about this flag and it's name. Fundamentally, this

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. For what it's worth, I also find this useful to be able to see at a glance what the setting does. I know I've tried several different settings in the past before finding the one I was looking for. https://reviews.llvm.org/D30532 ___

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: test/clang-tidy/readability-braces-around-statements-format.cpp:1 +// RUN: %check_clang_tidy %s readability-braces-around-statements %t -- -format -- + alexfh wrote: > malcolm.parsons wrote: > > Will clang-tidy look for

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh updated this revision to Diff 90445. alexfh marked an inline comment as done. alexfh added a comment. Replace the separate -format and -style options with -format-style (default is 'none', which means no formatting). https://reviews.llvm.org/D30564 Files: clang-tidy/ClangTidy.cpp cla

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D30564#691441, @alexfh wrote: > Replace the separate -format and -style options with -format-style (default is > 'none', which means no formatting). Is there a style that means use my .clang-format file? https://reviews.llvm.org/D3

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. > For bool options it seems easiest to do something like: > true: x = ( int32 )y; > false: x = (int32)y; That works for single declarations but for stuff like: > SomeClass::Constructor() > : a(a) > , b(b) > , c(c) {} I won't be

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh updated this revision to Diff 90447. alexfh added a comment. Expanded -format-style option description. Run cleanup tests with different format styles, just in case. https://reviews.llvm.org/D30564 Files: clang-tidy/ClangTidy.cpp clang-tidy/tool/ClangTidyMain.cpp docs/ReleaseNotes

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D30564#691446, @malcolm.parsons wrote: > In https://reviews.llvm.org/D30564#691441, @alexfh wrote: > > > Replace the separate -format and -style options with -format-style (default > > is > > 'none', which means no formatting). > > > Is there

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh updated this revision to Diff 90448. alexfh added a comment. Clarify the 'file' option a bit. https://reviews.llvm.org/D30564 Files: clang-tidy/ClangTidy.cpp clang-tidy/tool/ClangTidyMain.cpp docs/ReleaseNotes.rst docs/clang-tidy/index.rst test/clang-tidy/clean-up-code.cpp te

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. I agree, just generally we should aim for keeping these short. The example you gave might actually be reasonable to compare in two columns, i.e.: true: false: SomeClass::Constructor() vs. SomeClass::Constructor() : a(a),

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. LGTM. https://reviews.llvm.org/D30564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. PTAL https://reviews.llvm.org/D30564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 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 https://reviews.llvm.org/D30564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tidy/ClangTidy.cpp:214 + llvm::errs() << llvm::toString(Replacements.takeError()) << "\n"; + continue; +} Maybe still apply the replacements if formatting fails? https://reviews.llvm.org/

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh updated this revision to Diff 90452. alexfh added a comment. Apply changes even when formatting fails. https://reviews.llvm.org/D30564 Files: clang-tidy/ClangTidy.cpp clang-tidy/tool/ClangTidyMain.cpp docs/ReleaseNotes.rst docs/clang-tidy/index.rst test/clang-tidy/clean-up-code

[clang-tools-extra] r296864 - [clang-tidy] Format code around applied fixes

2017-03-03 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Mar 3 05:16:34 2017 New Revision: 296864 URL: http://llvm.org/viewvc/llvm-project?rev=296864&view=rev Log: [clang-tidy] Format code around applied fixes Summary: Add -format option (disabled by default for now) to trigger formatting of replacements. Reviewers: ioeric R

[PATCH] D30489: [analyzer] catch out of bounds for VLA

2017-03-03 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. To me it seems that the extent is calculated properly in ArrayBoundsV2. Existing code: DefinedOrUnknownSVal extentVal = rawOffset.getRegion()->getExtent(svalBuilder); This ugly little debug code will extract the needed VLA information from the extentVal..

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL296864: [clang-tidy] Format code around applied fixes (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D30564?vs=90452&id=90453#toc Repository: rL LLVM https://reviews.llvm.or

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I also think that examples for the flags are good. My use case is that while developing/debugging its nice to see a short example for a random flag in the documentation pop-up. https://reviews.llvm.org/D30532 ___ cfe-comm

[PATCH] D30487: ClangFormat - Add option to break before inheritance separation operator in class declaration

2017-03-03 Thread Andi via Phabricator via cfe-commits
Abpostelnicu added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:2400 +// Returns 'true' if there is an TT_InheritanceComma in the current token list. +static bool hasMultipleInheritance(const FormatToken &Tok) { + for (const FormatToken* nextTok = Tok.Next; nextTok

[PATCH] D30487: ClangFormat - Add option to break before inheritance separation operator in class declaration

2017-03-03 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Before `'`? Can you give an example? Repository: rL LLVM https://reviews.llvm.org/D30487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30487: ClangFormat - Add option to break before inheritance separation operator in class declaration

2017-03-03 Thread Andi via Phabricator via cfe-commits
Abpostelnicu added a comment. In https://reviews.llvm.org/D30487#691506, @djasper wrote: > Before `'`? Can you give an example? MY mistake, i wanted to write ``:` Repository: rL LLVM https://reviews.llvm.org/D30487 ___ cfe-commits mailing list

[PATCH] D30565: [analyzer] Terminate analysis on OpenMP code instead of crashing

2017-03-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. `git blame` shows that OMP* statements were added to the switch block by different authors while OpenMP support in clang was implemented. Looks like they were put to "Should not appear" section instead of "Unsupported" by mistake. https://reviews.llvm.org/D30565

[clang-tools-extra] r296867 - [clang-tidy] Fix modernize-use-emplace docs

2017-03-03 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Fri Mar 3 06:42:22 2017 New Revision: 296867 URL: http://llvm.org/viewvc/llvm-project?rev=296867&view=rev Log: [clang-tidy] Fix modernize-use-emplace docs Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-emplace.rst Modified: clang-tools-extra/tru

[PATCH] D30487: ClangFormat - Add option to break before inheritance separation operator in class declaration

2017-03-03 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Do you know whether that is intentional? The style guide isn't really conclusive. Repository: rL LLVM https://reviews.llvm.org/D30487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D30487: ClangFormat - Add option to break before inheritance separation operator in class declaration

2017-03-03 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:2486 Style.BreakConstructorInitializersBeforeComma && !Style.ConstructorInitializerAllOnOneLineOrOnePerLine) At any rate, I think this is what makes single-item ctor init lists

[PATCH] D30487: ClangFormat - Add option to break before inheritance separation operator in class declaration

2017-03-03 Thread Andi via Phabricator via cfe-commits
Abpostelnicu added a comment. In https://reviews.llvm.org/D30487#691517, @djasper wrote: > Do you know whether that is intentional? The style guide isn't really > conclusive. Well i'm not sure, because as you said the document is not clear but i think that when we have a single initialiser it

[PATCH] D30569: [clang-tidy] misc-use-after-move: Fix failing assertion

2017-03-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added a subscriber: JDevlieghere. I've added a test case that (without the fix) triggers the assertion, which happens when a move happens in an implicitly called conversion operator. https://reviews.llvm.org/D30569 Files: clang-tidy/misc/UseAfterMoveCheck

[PATCH] D30569: [clang-tidy] misc-use-after-move: Fix failing assertion

2017-03-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: test/clang-tidy/misc-use-after-move.cpp:285 // CHECK-MESSAGES: [[@LINE-1]]:3: warning: 'a' used after it was moved - // CHECK-MESSAGES: [[@LINE-3]]:6: note: move occurred here + // CHECK-MESSAGES: [[@LINE-3]]:7: note: move occurred

[PATCH] D30569: [clang-tidy] misc-use-after-move: Fix failing assertion

2017-03-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added inline comments. Comment at: test/clang-tidy/misc-use-after-move.cpp:285 // CHECK-MESSAGES: [[@LINE-1]]:3: warning: 'a' used after it was moved - // CHECK-MESSAGES: [[@LINE-3]]:6: note: move occurred here + // CHECK-MES

[PATCH] D30487: ClangFormat - Add option to break before inheritance separation operator in class declaration

2017-03-03 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Hm. Unfortunately, this seems to have been implemented to support Webkit style and Webkit style is explicit about wanting this (https://webkit.org/code-style-guidelines/) :(. But maybe the solution to that is to add an extra flag like AlwaysWrapInitializerList. Really

Re: [clang-tools-extra] r296867 - [clang-tidy] Fix modernize-use-emplace docs

2017-03-03 Thread Malcolm Parsons via cfe-commits
On 3 March 2017 at 12:42, Piotr Padlewski via cfe-commits wrote: > w.emplace_back(std::make_pair(21L, 37L); Unbalanced (). -- Malcolm Parsons ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D30569: [clang-tidy] misc-use-after-move: Fix failing assertion

2017-03-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thanks! Comment at: test/clang-tidy/misc-use-after-move.cpp:285 // CHECK-MESSAGES: [[@LINE-1]]:3: warning: 'a' used after it was moved - // CHECK-MESSAGES: [[@LINE-3]

[PATCH] D30567: [clang-tidy] Fix treating non-space whitespaces in checks list.

2017-03-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. What's the practical use of newlines and tab characters in the glob list? https://reviews.llvm.org/D30567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30487: ClangFormat - Add option to break before inheritance separation operator in class declaration

2017-03-03 Thread Andi via Phabricator via cfe-commits
Abpostelnicu added a comment. In https://reviews.llvm.org/D30487#691535, @djasper wrote: > Hm. Unfortunately, this seems to have been implemented to support Webkit > style and Webkit style is explicit about wanting this > (https://webkit.org/code-style-guidelines/) :(. > > But maybe the solutio

[PATCH] D30569: [clang-tidy] misc-use-after-move: Fix failing assertion

2017-03-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added inline comments. Comment at: test/clang-tidy/misc-use-after-move.cpp:285 // CHECK-MESSAGES: [[@LINE-1]]:3: warning: 'a' used after it was moved - // CHECK-MESSAGES: [[@LINE-3]]:6: note: move occurred here + // CHECK-MES

[PATCH] D15090: [Static Analyzer] New checker hook: checkInitialState

2017-03-03 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In the meantime CheckBeginFunction has been implemented separately. I think you should "abandon" this revision so it is shown as closed. https://reviews.llvm.org/D15090 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D30569: [clang-tidy] misc-use-after-move: Fix failing assertion

2017-03-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: test/clang-tidy/misc-use-after-move.cpp:285 // CHECK-MESSAGES: [[@LINE-1]]:3: warning: 'a' used after it was moved - // CHECK-MESSAGES: [[@LINE-3]]:6: note: move occurred here + // CHECK-MESSAGES: [[@LINE-3]]:7: note: move occurred h

[PATCH] D30341: [analyzer] clarify error messages about uninitialized function arguments

2017-03-03 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki updated this revision to Diff 90471. danielmarjamaki added a comment. Fix review comment Repository: rL LLVM https://reviews.llvm.org/D30341 Files: lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp test/Analysis/NewDelete-checker-test.cpp test/Analysis/diagnostics/u

[PATCH] D30174: [Sema][ObjC] Warn about 'performSelector' calls with selectors that return record types

2017-03-03 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked 3 inline comments as done. arphaman added inline comments. Comment at: lib/AST/DeclObjC.cpp:987 unsigned noParams = param_size(); if (noParams < 1 || noParams > 3) family = OMF_None; ahatanak wrote: > It seems like this code

[PATCH] D30174: [Sema][ObjC] Warn about 'performSelector' calls with selectors that return record types

2017-03-03 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 90473. arphaman marked 3 inline comments as done. arphaman added a comment. The updated diff: - Warns for vector types. - Addresses Akira's comments. Repository: rL LLVM https://reviews.llvm.org/D30174 Files: include/clang/Basic/DiagnosticSemaKinds.t

[PATCH] D30487: ClangFormat - Add option to break before inheritance separation operator in class declaration

2017-03-03 Thread Andi via Phabricator via cfe-commits
Abpostelnicu updated this revision to Diff 90475. Repository: rL LLVM https://reviews.llvm.org/D30487 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/Format.cpp lib/Format/FormatToken.h lib/Format/TokenAnnotator.c

[PATCH] D30487: ClangFormat - Add option to break before inheritance separation operator in class declaration

2017-03-03 Thread Andi via Phabricator via cfe-commits
Abpostelnicu updated this revision to Diff 90480. Abpostelnicu added a comment. corrected some format issues. Repository: rL LLVM https://reviews.llvm.org/D30487 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/Forma

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 90482. sylvestre.ledru added a comment. With the changes requested by Daniel. This is much better indeed! https://reviews.llvm.org/D30532 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h Index: include/clang/Format/Format.h

[PATCH] D30492: [clang-format] Allow all but the first string literal in a sequence to be put on a newline

2017-03-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir abandoned this revision. krasimir added a comment. This patch is superseded by https://reviews.llvm.org/D30575. https://reviews.llvm.org/D30492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2017-03-03 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo marked an inline comment as done. gerazo added a comment. Hmm... I am thinking on this issue for a week now... I've played with the idea of implementing cleansing rules in GenericTaintChecker. It would be elegant but unfortunately, I have to think they are not general. Cleansing of a str

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 90486. sylvestre.ledru added a comment. updated => affected + align the vs https://reviews.llvm.org/D30532 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h Index: include/clang/Format/Format.h =

[PATCH] D30373: [analyzer] NFC: Update test infrastructure to support multiple constraint managers

2017-03-03 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. Looks great. Thanks!! https://reviews.llvm.org/D30373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30565: [analyzer] Terminate analysis on OpenMP code instead of crashing

2017-03-03 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. Thanks for fixing this! It looks like this is tracked by PR31835. https://bugs.llvm.org//show_bug.cgi?id=31835 https://reviews.llvm.org/D30565 ___

[PATCH] D30582: [Driver] Restructure handling of -ffast-math and similar options

2017-03-03 Thread John Brawn via Phabricator via cfe-commits
john.brawn created this revision. The way -ffast-math and the various related options to tweak floating-point handling are handled is inflexible and rather confusing. This patch restructures things so that we go through the options adjusting our idea of what's enabled as we go, instead of tryin

r296884 - [Analyzer] Terminate analysis on OpenMP code instead of assertion crash

2017-03-03 Thread Aleksei Sidorin via cfe-commits
Author: a.sidorin Date: Fri Mar 3 10:58:53 2017 New Revision: 296884 URL: http://llvm.org/viewvc/llvm-project?rev=296884&view=rev Log: [Analyzer] Terminate analysis on OpenMP code instead of assertion crash * ExprEngine assumes that OpenMP statements should never appear in CFG. However, curren

[PATCH] D30565: [analyzer] Terminate analysis on OpenMP code instead of crashing

2017-03-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL296884: [Analyzer] Terminate analysis on OpenMP code instead of assertion crash (authored by a.sidorin). Changed prior to commit: https://reviews.llvm.org/D30565?vs=90441&id=90499#toc Repository: rL

[PATCH] D30565: [analyzer] Terminate analysis on OpenMP code instead of crashing

2017-03-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Thank you Devin. Should we submit this to 4.0? I guess there are not many users of both CSA and OpenMP but PR you pointed is already the second report about this issue I see. Repository: rL LLVM https://reviews.llvm.org/D30565 __

[clang-tools-extra] r296888 - [clang-tidy] Yet another docs fixes

2017-03-03 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Fri Mar 3 11:16:11 2017 New Revision: 296888 URL: http://llvm.org/viewvc/llvm-project?rev=296888&view=rev Log: [clang-tidy] Yet another docs fixes Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-emplace.rst Modified: clang-tools-extra/trunk/docs/

[libcxx] r296889 - Fix libc++ test to pass in C++03 mode

2017-03-03 Thread Mehdi Amini via cfe-commits
Author: mehdi_amini Date: Fri Mar 3 11:24:29 2017 New Revision: 296889 URL: http://llvm.org/viewvc/llvm-project?rev=296889&view=rev Log: Fix libc++ test to pass in C++03 mode Was hitting: "error: scalar initializer cannot be empty" Modified: libcxx/trunk/test/std/depr/depr.c.headers/stdio_h

[PATCH] D28297: [StaticAnalyzer] Fix crash in CastToStructChecker

2017-03-03 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Thanks. looks good. https://reviews.llvm.org/D28297 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D30565: [analyzer] Terminate analysis on OpenMP code instead of crashing

2017-03-03 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. @zaks.anna: What do you think? Should we try to get this into clang 4.0? Repository: rL LLVM https://reviews.llvm.org/D30565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[PATCH] D30551: [AMDGPU] Add builtin functions readlane ds_permute mov_dpp

2017-03-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 90520. yaxunl marked 3 inline comments as done. yaxunl added a comment. remove redundant code. make mov_dpp target builtin. https://reviews.llvm.org/D30551 Files: include/clang/Basic/BuiltinsAMDGPU.def lib/Basic/Targets.cpp lib/CodeGen/CGBuiltin.cpp

Re: [libcxx] r296840 - Work around test failure on 32 bit OS X

2017-03-03 Thread Adrian Prantl via cfe-commits
Does that mean there is a bug in libcxx that should be documented somewhere? -- adrian > On Mar 2, 2017, at 3:18 PM, Eric Fiselier via cfe-commits > wrote: > > Author: ericwf > Date: Thu Mar 2 17:18:40 2017 > New Revision: 296840 > > URL: http://llvm.org/viewvc/llvm-project?rev=296840&view=re

[PATCH] D27387: [libc++] Add a key function for bad_function_call

2017-03-03 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai updated this revision to Diff 90524. smeenai added a comment. Address comments https://reviews.llvm.org/D27387 Files: include/__config include/functional lib/CMakeLists.txt src/functional.cpp Index: src/functional.cpp ===

[PATCH] D30589: [ExprInspectionChecker] Improve usability for C

2017-03-03 Thread Keno Fischer via Phabricator via cfe-commits
loladiro created this revision. Some of the magic functions take arguments of arbitrary type. However, for semantic correctness, the compiler still requires a declaration of these functions with the correct type. Since C does not have argument-type-overloaded function, this made those functions ha

[PATCH] D30590: Don't assume cleanup emission preserves dominance in expr evaluation

2017-03-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. Because of the existence branches out of GNU statement expressions, it is possible that emitting cleanups for a full expression may cause the new insertion point to not be dominated by the result of the inner expression. Consider this example: struct Foo { Foo(); ~Foo

[PATCH] D28543: Eliminates uninitialized warning for volatile variables.

2017-03-03 Thread CJ DiMeglio via Phabricator via cfe-commits
lethalantidote added a comment. Is there any subgroup that one could suggest for this warning to fall under? https://reviews.llvm.org/D28543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D30591: Introduce the feature "linux" for tests only for linux

2017-03-03 Thread Taewook Oh via Phabricator via cfe-commits
twoh created this revision. This feature is needed to re-enable https://reviews.llvm.org/rL293004, which resembles gcc's behavior in finding the input file name from a preprocessed source. The patch has been reverted in https://reviews.llvm.org/rL293032, because the test checks FILE symbol of EL

[PATCH] D30015: Add arch-specific directory to search path

2017-03-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. Looks good with a minor comment about a comment in the test case. Comment at: lib/Driver/Tools.cpp:2007-2009 + // In the cross-compilation case, arch-specific library path is likely + // unavailable at runtime. + if (TC.isCros

[PATCH] D30239: enable -flto=thin in clang-cl

2017-03-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Do you guys think that maybe -flto should imply -fuse-ld=lld, or is that too much magic? Repository: rL LLVM https://reviews.llvm.org/D30239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D30592: [clang-tidy] Fix diag message for catch-by-value

2017-03-03 Thread Florian Gross via Phabricator via cfe-commits
fgross created this revision. Herald added a subscriber: JDevlieghere. catch (std::exception ex) { } Was flagged with "catch handler catches a pointer value". https://reviews.llvm.org/D30592 Files: clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp Index: clang-tidy/misc/ThrowByVa

[PATCH] D30015: Add arch-specific directory to search path

2017-03-03 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama updated this revision to Diff 90532. pirama edited the summary of this revision. pirama added a comment. Fixed comment in test and added a test for -fsanitize=address without -shared-libasan. https://reviews.llvm.org/D30015 Files: include/clang/Driver/ToolChain.h lib/Driver/ToolChai

[PATCH] D30239: enable -flto=thin in clang-cl

2017-03-03 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In https://reviews.llvm.org/D30239#691972, @rnk wrote: > Do you guys think that maybe -flto should imply -fuse-ld=lld, or is that too > much magic? I don't know enough about windows, but I would think it may be surprising for a user that -flto changes the linker b

[PATCH] D30015: Add arch-specific directory to search path

2017-03-03 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama marked an inline comment as done. pirama added inline comments. Comment at: lib/Driver/Tools.cpp:2007-2009 + // In the cross-compilation case, arch-specific library path is likely + // unavailable at runtime. + if (TC.isCrossCompiling()) return; rnk wro

[PATCH] D30589: [ExprInspectionChecker] Improve usability for C

2017-03-03 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. Thanks! This bugged me as well, but i didn't think of this trick :) https://reviews.llvm.org/D30589 ___ cfe-commits mailing list cfe-commits@lists.llvm

[PATCH] D30341: [analyzer] clarify error messages about uninitialized function arguments

2017-03-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. The code looks good to me, but i'm expressing a tiny doubt: regardless of the output format, the user always has the relevant argument highlighted anyway (column number, tilde-underlined in command line, blue-ish box in scan-build, etc.), so the only significant clarificati

[libcxx] r296919 - Fix hash requirements check in __hash_table.

2017-03-03 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Mar 3 16:35:58 2017 New Revision: 296919 URL: http://llvm.org/viewvc/llvm-project?rev=296919&view=rev Log: Fix hash requirements check in __hash_table. r296565 attempted to add better diagnostics when an unordered container is instantiated with a hash that doesn't meet t

[PATCH] D30489: [analyzer] catch out of bounds for VLA

2017-03-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D30489#691475, @danielmarjamaki wrote: > Do you agree that this is the problem? Would it be a good idea to try to keep > the sz in the ProgramState? Environment stores values only temporarily. It's kind of a scratch pad for temporary symbolic c

[libcxx] r296922 - Remove the buildit and testit scripts; they haven't been supported in years

2017-03-03 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Mar 3 16:47:45 2017 New Revision: 296922 URL: http://llvm.org/viewvc/llvm-project?rev=296922&view=rev Log: Remove the buildit and testit scripts; they haven't been supported in years Removed: libcxx/trunk/lib/buildit libcxx/trunk/test/testit Removed: libcxx/trun

Re: [libcxx] r296919 - Fix hash requirements check in __hash_table.

2017-03-03 Thread Nico Weber via cfe-commits
"the specified hash does not meet the Hash requirements" isn't a very actionable diagnostic. Is it possible to use some warning text that lets people know what they need to do to make the compiler happy, instead of just telling them that the compiler is unhappy? On Fri, Mar 3, 2017 at 5:35 PM, Eri

[PATCH] D30593: Add correct "-isystem" warning handling to static analysis' BugReporter.

2017-03-03 Thread Kevin Marshall via Phabricator via cfe-commits
kmarshall added a comment. Note to reviewers: this diff is relative to "llvm/cfe" - I couldn't find a way to specify a repository subpath to use for this diff. Repository: rL LLVM https://reviews.llvm.org/D30593 ___ cfe-commits mailing list cfe

[PATCH] D30593: Add correct "-isystem" warning handling to static analysis' BugReporter.

2017-03-03 Thread Kevin Marshall via Phabricator via cfe-commits
kmarshall created this revision. The Clang static analyzer doesn't follow the warning suppression semantics of the "-isystem" command line flag. This patch adds a check to BugReporter which causes it to drop any BugReports which originated from a system header (descendant of an -isystem path).

[PATCH] D30593: Add correct "-isystem"/"-isysroot" warning handling to static analysis' BugReporter.

2017-03-03 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. http://llvm-cs.pcc.me.uk/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h/risInSystemHeader suggests that the analyzer has some plumbing for this, so I added dcoughlin as reviewer, who has touched some of those lines before. dcoughlin, as background

[PATCH] D30591: Introduce the feature "linux" for tests only for linux

2017-03-03 Thread Bob Haarman via Phabricator via cfe-commits
inglorion added a comment. Checking for linux when really you want to check for ELF doesn't seem right. In this case, I think there is an better way to do it; instead of relying on llvm-objdump, could you emit an LLVM assembly file and check that for presence of the string you want? I think if

r296927 - Add arch-specific directory to search path

2017-03-03 Thread Pirama Arumuga Nainar via cfe-commits
Author: pirama Date: Fri Mar 3 17:20:49 2017 New Revision: 296927 URL: http://llvm.org/viewvc/llvm-project?rev=296927&view=rev Log: Add arch-specific directory to search path Summary: This change adds an arch-specific subdirectory in /lib/ to the linker search path. This path also gets added a

[PATCH] D30015: Add arch-specific directory to search path

2017-03-03 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL296927: Add arch-specific directory to search path (authored by pirama). Changed prior to commit: https://reviews.llvm.org/D30015?vs=90532&id=90545#toc Repository: rL LLVM https://reviews.llvm.org/D

[PATCH] D30015: Add arch-specific directory to search path

2017-03-03 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama added a comment. Committed. Thanks for the reviews! Repository: rL LLVM https://reviews.llvm.org/D30015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30592: [clang-tidy] Fix diag message for catch-by-value

2017-03-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. This change is missing test cases. https://reviews.llvm.org/D30592 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

  1   2   >