r288119 - clang-format: Fix unnnecessary line break.

2016-11-29 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Nov 29 03:40:01 2016 New Revision: 288119 URL: http://llvm.org/viewvc/llvm-project?rev=288119&view=rev Log: clang-format: Fix unnnecessary line break. Before: aa((, ), // , a); After: aa

r288121 - clang-format: [JS] Properly format dict literals that skip labels.

2016-11-29 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Nov 29 03:40:36 2016 New Revision: 288121 URL: http://llvm.org/viewvc/llvm-project?rev=288121&view=rev Log: clang-format: [JS] Properly format dict literals that skip labels. Modified: cfe/trunk/lib/Format/TokenAnnotator.cpp cfe/trunk/unittests/Format/FormatTestJ

r288120 - clang-format: Wrap complex binary expressions on the RHS of a comma.

2016-11-29 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Nov 29 03:40:32 2016 New Revision: 288120 URL: http://llvm.org/viewvc/llvm-project?rev=288120&view=rev Log: clang-format: Wrap complex binary expressions on the RHS of a comma. Specifically, if the RHS of a comma is a complex binary expression and spans multiple lines, i

[PATCH] D27187: [clang-tidy] Do not move parameter if only DeclRefExpr occurs inside of a loop

2016-11-29 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/utils/DeclRefExprUtils.cpp:127 + match(findAll(declRefExpr(equalsNode(&DeclRef), +unless(hasAncestor(stmt(anyOf( +forStmt(), cxxForRangeStmt(), whileStmt(

r288124 - Correct comment: we are creating a canonicla decltypetype.

2016-11-29 Thread Yaron Keren via cfe-commits
Author: yrnkrn Date: Tue Nov 29 04:08:20 2016 New Revision: 288124 URL: http://llvm.org/viewvc/llvm-project?rev=288124&view=rev Log: Correct comment: we are creating a canonicla decltypetype. Modified: cfe/trunk/lib/AST/ASTContext.cpp Modified: cfe/trunk/lib/AST/ASTContext.cpp URL: http://

r288126 - [OpenCL] Prohibit using reserve_id_t in program scope.

2016-11-29 Thread Alexey Bader via cfe-commits
Author: bader Date: Tue Nov 29 04:21:40 2016 New Revision: 288126 URL: http://llvm.org/viewvc/llvm-project?rev=288126&view=rev Log: [OpenCL] Prohibit using reserve_id_t in program scope. Patch by Egor Churaev (echuraev). Reviewers: Anastasia Subscribers: cfe-commits, yaxunl, bader Differential

r288125 - Removed DEBUG_TYPE from TokenAnalyzer.h

2016-11-29 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Tue Nov 29 04:21:28 2016 New Revision: 288125 URL: http://llvm.org/viewvc/llvm-project?rev=288125&view=rev Log: Removed DEBUG_TYPE from TokenAnalyzer.h Summary: Defining DEBUG_TYPE in a header file doesn't make sense. It is already defined in the corresponding source file.

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-11-29 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:173-177 +/// Matches the type that was substituted for the template parameter. +AST_MATCHER_P(SubstTemplateTypeParmType, hasReplacementType, + ast_matchers::internal::Matcher, InnerMatche

[PATCH] D27099: [OpenCL] Prohibit using reserve_id_t in program scope.

2016-11-29 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288126: [OpenCL] Prohibit using reserve_id_t in program scope. (authored by bader). Changed prior to commit: https://reviews.llvm.org/D27099?vs=79508&id=79525#toc Repository: rL LLVM https://reviews

[PATCH] D26916: [ObjC] Avoid a @try/@finally/@autoreleasepool fixit when parsing an expression

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Parse/ParseObjc.cpp:2877 +if (GetLookAheadToken(1).is(tok::l_brace) && +ExprStatementTokLoc == AtLoc) { char ch = Tok.getIdentifierInfo()->getNameStart()[0]; bruno wrote: > Does this o

[PATCH] D27104: Unify and simplify the behavior of the hasDeclaration matcher.

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 79530. klimek added a comment. Add tests, update hasDeclaration to work for ElaboratedType. https://reviews.llvm.org/D27104 Files: include/clang/ASTMatchers/ASTMatchersInternal.h unittests/ASTMatchers/ASTMatchersTraversalTest.cpp Index: unittests/ASTMat

[PATCH] D27104: Unify and simplify the behavior of the hasDeclaration matcher.

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D27104#607161, @lukasza wrote: > Forcing shallow matching means that unit test below will stop passing after > this CL. > > TEST(HasDeclaration, DeepTagType) { > std::string input = > "class Foo {};\n" > "using Bar = Foo;\

[PATCH] D26922: [ObjC++] Don't enter a C++ declarator context when the current context is an Objective-C declaration

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D26922#607186, @ahatanak wrote: > I wonder whether it is possible to avoid calling > DeclScopeObj.EnterDeclaratorScope at ParseDecl.cpp:5317 instead of fixing > Sema::ActOnCXXEnterDeclaratorScope? > > I believe it's calling EnterDeclaratorSc

[PATCH] D27199: [libcxx] Make std::ignore constexpr

2016-11-29 Thread Anton Bikineev via Phabricator via cfe-commits
AntonBikineev created this revision. AntonBikineev added reviewers: mclow.lists, EricWF. AntonBikineev added a subscriber: cfe-commits. This addresses DR 2773 . // 20.5.2.4, tuple creation functions: constexpr unspecified ignore; } htt

[PATCH] D26829: [clang] Allow lexer to handle string_view literals

2016-11-29 Thread Anton Bikineev via Phabricator via cfe-commits
AntonBikineev added a comment. @rsmith Richard, any plans to merge this or is there anything left? https://reviews.llvm.org/D26829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26838: [analyzer] Enforce super-region classes for various memory regions through compile-time and run-time type checks.

2016-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:1279 /// associated element type, index, and super region. const ElementRegion *getElementRegion(QualType elementType, NonLoc Idx, +co

[PATCH] D26838: [analyzer] Enforce super-region classes for various memory regions through compile-time and run-time type checks.

2016-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 79537. NoQ marked 5 inline comments as done. NoQ added a comment. Thanks for the comments! Addressed. https://reviews.llvm.org/D26838 Files: include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h include/clang/StaticAnalyzer/Core/PathSensitive/Store.h

[PATCH] D26837: [analyzer] Litter the SVal/SymExpr/MemRegion class hierarchy with asserts.

2016-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 79538. NoQ marked 3 inline comments as done. NoQ added a comment. Thanks for the comments! Addressed. https://reviews.llvm.org/D26837 Files: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h include/clang/StaticAnalyzer/Core/PathSensitive/

[PATCH] D26837: [analyzer] Litter the SVal/SymExpr/MemRegion class hierarchy with asserts.

2016-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h:319 public: - SymbolVal(SymbolRef sym) : NonLoc(SymbolValKind, sym) {} + SymbolVal() = delete; + SymbolVal(SymbolRef sym) : NonLoc(SymbolValKind, sym) { assert(sym); } -

[PATCH] D26839: [analyzer] An attempt to fix pr19539 - crashes on temporaries life-extended via members

2016-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 79540. NoQ marked an inline comment as done. NoQ added a comment. Update the comment. https://reviews.llvm.org/D26839 Files: lib/StaticAnalyzer/Core/ExprEngine.cpp test/Analysis/lifetime-extension.cpp Index: test/Analysis/lifetime-extension.cpp ===

[PATCH] D27202: [analyzer] Do not conjure a symbol for return value of a conservatively evaluated function

2016-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: zaks.anna, dcoughlin, xazax.hun, a.sidorin. NoQ added subscribers: cfe-commits, baloghadamsoftware. Instead, return a `nonloc::LazyCompoundVal` of a temporary region for the call expression, with a trivial store in which the temporary region is inva

r288133 - [AST] Use static_assert to verify types instead of undefined classes.

2016-11-29 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Nov 29 06:41:21 2016 New Revision: 288133 URL: http://llvm.org/viewvc/llvm-project?rev=288133&view=rev Log: [AST] Use static_assert to verify types instead of undefined classes. No functionliaty change intended. Modified: cfe/trunk/include/clang/AST/CanonicalType.h

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a reviewer: NoQ. NoQ added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D25660#598576, @baloghadamsoftware wrote: > In https://reviews.llvm.org/D25660#590778, @NoQ wrote: > > > - Agree on the `evalAssume()` implement

[PATCH] D27204: [libcxxabi] Introduce an externally threaded libc++abi variant

2016-11-29 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath created this revision. rmaprath added reviewers: mclow.lists, EricWF, bcraig. rmaprath added a subscriber: cfe-commits. Herald added a subscriber: mgorny. This is more-or-less a mirror image of https://reviews.llvm.org/D21968, repeated for libcxxabi. I will soon upload a dependent patch

[PATCH] D27207: Adds hasUnqualifiedDesugaredType to allow matching through type sugar.

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek created this revision. klimek added reviewers: bkramer, lukasza. klimek added a subscriber: cfe-commits. https://reviews.llvm.org/D27207 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp unittests/ASTMatchers/ASTMa

[PATCH] D27140: Allow clang to write compilation database records

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added reviewers: bkramer, akyrtzi. klimek added a comment. Adding some folks. One question is whether we can use the additional output stuff doug added at some point for this. https://reviews.llvm.org/D27140 ___ cfe-commits mailing list cfe-

[PATCH] D27181: [ASTImporter] Support for importing UsingDecl and UsingShadowDecl

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Can you add a test to ASTMatchersNodeTests.cpp? Otherwise LG for the matcher parts. https://reviews.llvm.org/D27181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D27138: Extend CompilationDatabase by a field for the output filename

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Tooling/JSONCompilationDatabase.cpp:266 +nodeToCommandLine(Syntax, std::get<2>(CommandsRef[I])), +Output ? Output->getValue(OutputStorage) : ""); } joerg wrote: > klimek wrote: > > joerg wrote: > >

[PATCH] D27208: [change-namespace] fix non-calling function references.

2016-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: hokein. ioeric added a subscriber: cfe-commits. https://reviews.llvm.org/D27208 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h unittests/change-namespace/ChangeNamespaceTests.cpp Index: unittests/change-

[PATCH] D27187: [clang-tidy] Do not move parameter if only DeclRefExpr occurs inside of a loop

2016-11-29 Thread Felix Berger via Phabricator via cfe-commits
flx removed rL LLVM as the repository for this revision. flx updated this revision to Diff 79550. https://reviews.llvm.org/D27187 Files: clang-tidy/performance/UnnecessaryValueParamCheck.cpp clang-tidy/utils/DeclRefExprUtils.cpp clang-tidy/utils/DeclRefExprUtils.h test/clang-tidy/performa

[PATCH] D27187: [clang-tidy] Do not move parameter if only DeclRefExpr occurs inside of a loop

2016-11-29 Thread Felix Berger via Phabricator via cfe-commits
flx marked an inline comment as done. flx added inline comments. Comment at: clang-tidy/utils/DeclRefExprUtils.cpp:127 + match(findAll(declRefExpr(equalsNode(&DeclRef), +unless(hasAncestor(stmt(anyOf( +forSt

[PATCH] D26991: Hoist redundant load

2016-11-29 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists requested changes to this revision. mclow.lists added inline comments. This revision now requires changes to proceed. Comment at: libcxx/include/algorithm:1499 +// Load the first element from __first2 outside the loop because it is loop invariant +typename it

[PATCH] D27208: [change-namespace] fix non-calling function references.

2016-11-29 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM with few nits. Comment at: change-namespace/ChangeNamespace.cpp:434 +assert(Func); +const Decl *Context = Result.Nodes.getNodeAs("dc"); +assert(Context && "E

[PATCH] D27211: [clang-format] Implement comment reflowing

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. > for these cases the > original Breakable{Line,Block}Comment still breaks the long lines. Do you intend for this to continue to be the case? https://reviews.llvm.org/D27211 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D27208: [change-namespace] fix non-calling function references.

2016-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 79555. ioeric marked 3 inline comments as done. ioeric added a comment. - Address comments. https://reviews.llvm.org/D27208 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h unittests/change-namespace/ChangeNamespaceTests.c

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 79556. arphaman added a comment. The updated diff has the following changes: - The default value for '-fstrict-return' is now the same across all platforms, the Darwin specific -fno-strict-return was removed. - The 'fno-strict-return' optimisation avoidance

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:530 + // Don't need to mark Objective-C methods or blocks since the undefined + // behaviour optimization isn't used for them. +} mehdi_amini wrote: > Quuxplusone wrote: > > This see

[PATCH] D27208: [change-namespace] fix non-calling function references.

2016-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 79558. ioeric added a comment. - Format code. https://reviews.llvm.org/D27208 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h unittests/change-namespace/ChangeNamespaceTests.cpp Index: unittests/change-namespace/ChangeNa

[clang-tools-extra] r288139 - [change-namespace] fix non-calling function references.

2016-11-29 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Nov 29 08:15:14 2016 New Revision: 288139 URL: http://llvm.org/viewvc/llvm-project?rev=288139&view=rev Log: [change-namespace] fix non-calling function references. Reviewers: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D27208 Modifie

[PATCH] D27208: [change-namespace] fix non-calling function references.

2016-11-29 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288139: [change-namespace] fix non-calling function references. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D27208?vs=79558&id=79559#toc Repository: rL LLVM https://revie

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: test/CodeGenCXX/return.cpp:47 + // CHECK-NOSTRICT-OPT-NEXT: zext + // CHECK-NOSTRICT-OPT-NEXT: ret i32 +} mehdi_amini wrote: > Document what's going on in the tests please. > I added some comments that help explain w

[PATCH] D27138: Extend CompilationDatabase by a field for the output filename

2016-11-29 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. It's not the directory, but the output file. That's optional since it is a new addition and I don't want to invalidate all existing JSON databases. Repository: rL LLVM https://reviews.llvm.org/D27138 ___ cfe-commits mailin

[PATCH] D26991: Hoist redundant load

2016-11-29 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added inline comments. Comment at: libcxx/include/algorithm:1499 +// Load the first element from __first2 outside the loop because it is loop invariant +typename iterator_traits<_RandomAccessIterator1>::value_type __firstElement2 = *__first2; + ---

[PATCH] D25475: [analyzer] Add a new SVal to support pointer-to-member operations.

2016-11-29 Thread Kirill Romanenkov via Phabricator via cfe-commits
kromanenkov updated this revision to Diff 79560. kromanenkov added a comment. Thanks for your comments, Artem! Make function name less ambiguous. Also I take liberty to update analogical function name. https://reviews.llvm.org/D25475 Files: include/clang/StaticAnalyzer/Core/PathSensitive/Bas

[PATCH] D27138: Extend CompilationDatabase by a field for the output filename

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D27138#607786, @joerg wrote: > It's not the directory, but the output file. That's optional since it is a > new addition and I don't want to invalidate all existing JSON databases. It seems like we're talking past each other. I'm not suggesti

[PATCH] D25475: [analyzer] Add a new SVal to support pointer-to-member operations.

2016-11-29 Thread Kirill Romanenkov via Phabricator via cfe-commits
kromanenkov marked an inline comment as done. kromanenkov added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:217 + + llvm::ImmutableList consCXXBase( + const CXXBaseSpecifier *CBS, NoQ wrote: > Hmm, is it

[PATCH] D26465: [Diag] Optimize DiagnosticIDs::getDiagnosticSeverity

2016-11-29 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. Ping 2 https://reviews.llvm.org/D26465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r288143 - [libcxx] remove unused code

2016-11-29 Thread Aditya Kumar via cfe-commits
Author: hiraditya Date: Tue Nov 29 08:43:42 2016 New Revision: 288143 URL: http://llvm.org/viewvc/llvm-project?rev=288143&view=rev Log: [libcxx] remove unused code The macro _LIBCPP_UNROLL_LOOPS isn't used anywhere so the code was dead. Differential Revision: https://reviews.llvm.org/D26991 Mod

[PATCH] D26991: Remove unused code

2016-11-29 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya retitled this revision from "Hoist redundant load" to "Remove unused code". hiraditya updated this revision to Diff 79565. https://reviews.llvm.org/D26991 Files: include/algorithm Index: include/algorithm === --- includ

[PATCH] D27187: [clang-tidy] Do not move parameter if only DeclRefExpr occurs inside of a loop

2016-11-29 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/utils/DeclRefExprUtils.cpp:127 + match(findAll(declRefExpr(equalsNode(&DeclRef), +unless(hasAncestor(stmt(anyOf( +forStmt(), cxxForRangeStmt(), whileStmt(

[PATCH] D26991: Remove unused code

2016-11-29 Thread Aditya Kumar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288143: [libcxx] remove unused code (authored by hiraditya). Changed prior to commit: https://reviews.llvm.org/D26991?vs=79565&id=79566#toc Repository: rL LLVM https://reviews.llvm.org/D26991 Files:

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D27163#607078, @rsmith wrote: > A target-specific default for this, simply because there's a lot of code on > Darwin that happens to violate this language rule, doesn't make sense to me. > > Basing the behavior on whether a `-Wreturn-type`

[PATCH] D27138: Extend CompilationDatabase by a field for the output filename

2016-11-29 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Which struct are we talking about, `CompileCommandRef` or `CompileCommand`? It is a pointer in the former and a plain StringRef in the latter. I don't think making it a pointer in both is an advantage, i.e. distinguishing empty input from missing field is not valuable in

[PATCH] D26465: [Diag] Optimize DiagnosticIDs::getDiagnosticSeverity

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Is there any way to test this change? > This saves more than 5% of the parsing time according to perf. That sounds great. What did you test the parsing on? Will this patch get similar improvements for code that compiles without errors and warnings?

[clang-tools-extra] r288145 - [include-fixer] Don't eat one token too many when replacing a block of includes.

2016-11-29 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Nov 29 09:15:26 2016 New Revision: 288145 URL: http://llvm.org/viewvc/llvm-project?rev=288145&view=rev Log: [include-fixer] Don't eat one token too many when replacing a block of includes. SourceRanges are inclusive token ranges, this was trying to form an exclusive char ran

[PATCH] D27187: [clang-tidy] Do not move parameter if only DeclRefExpr occurs inside of a loop

2016-11-29 Thread Felix Berger via Phabricator via cfe-commits
flx added inline comments. Comment at: clang-tidy/utils/DeclRefExprUtils.cpp:127 + match(findAll(declRefExpr(equalsNode(&DeclRef), +unless(hasAncestor(stmt(anyOf( +forStmt(), cxxForRangeStmt(), whileStmt(),

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-11-29 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. I think you could add fixits for this. Comment at: clang-tidy/misc/MiscStringCompareCheck.cpp:48 + Finder->addMatcher(ifStmt(hasCondition(binaryOperator(hasOperatorName("=="), +hasLHS(strC

[PATCH] D27214: [ObjC] Encode type arguments in property information string constants

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: rjmccall, ahatanak. arphaman added a subscriber: cfe-commits. arphaman set the repository for this revision to rL LLVM. This patch ensures that Objective-C type arguments are included in the string constants that have encoded information a

[PATCH] D26611: Protect test for dynarray under libcpp-no-exceptions

2016-11-29 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288155: Protect test for dynarray under libcpp-no-exceptions (authored by rogfer01). Changed prior to commit: https://reviews.llvm.org/D26611?vs=77809&id=79580#toc Repository: rL LLVM https://review

[libcxx] r288155 - Protect test for dynarray under libcpp-no-exceptions

2016-11-29 Thread Roger Ferrer Ibanez via cfe-commits
Author: rogfer01 Date: Tue Nov 29 10:27:45 2016 New Revision: 288155 URL: http://llvm.org/viewvc/llvm-project?rev=288155&view=rev Log: Protect test for dynarray under libcpp-no-exceptions This test expects an exception be thrown. Differential Revision: https://reviews.llvm.org/D26611 Modified:

[libcxx] r288157 - Protect std::{, unordered_}map tests under noexceptions

2016-11-29 Thread Roger Ferrer Ibanez via cfe-commits
Author: rogfer01 Date: Tue Nov 29 10:37:48 2016 New Revision: 288157 URL: http://llvm.org/viewvc/llvm-project?rev=288157&view=rev Log: Protect std::{,unordered_}map tests under noexceptions Skip tests that use exceptions Differential Revision: https://reviews.llvm.org/D27093 Modified: libc

[PATCH] D27093: Protect std::{, unordered_}map tests under noexceptions

2016-11-29 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288157: Protect std::{,unordered_}map tests under noexceptions (authored by rogfer01). Changed prior to commit: https://reviews.llvm.org/D27093?vs=79212&id=79582#toc Repository: rL LLVM https://revi

[libcxx] r288156 - Protect locale tests under noexceptions

2016-11-29 Thread Roger Ferrer Ibanez via cfe-commits
Author: rogfer01 Date: Tue Nov 29 10:31:40 2016 New Revision: 288156 URL: http://llvm.org/viewvc/llvm-project?rev=288156&view=rev Log: Protect locale tests under noexceptions Skip tests that expect exceptions be thrown. Differential Revision: https://reviews.llvm.org/D27096 Modified: libc

[PATCH] D27096: Protect locale tests under noexceptions

2016-11-29 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288156: Protect locale tests under noexceptions (authored by rogfer01). Changed prior to commit: https://reviews.llvm.org/D27096?vs=79219&id=79581#toc Repository: rL LLVM https://reviews.llvm.org/D2

[libcxx] r288158 - Protect std::string tests under libcpp-no-exceptions

2016-11-29 Thread Roger Ferrer Ibanez via cfe-commits
Author: rogfer01 Date: Tue Nov 29 10:40:19 2016 New Revision: 288158 URL: http://llvm.org/viewvc/llvm-project?rev=288158&view=rev Log: Protect std::string tests under libcpp-no-exceptions Skip tests that expect an exception be thrown and/or disable unreachable catch handlers. Differential Revisi

[PATCH] D26612: Protect std::string tests under libcpp-no-exceptions

2016-11-29 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288158: Protect std::string tests under libcpp-no-exceptions (authored by rogfer01). Changed prior to commit: https://reviews.llvm.org/D26612?vs=78012&id=79583#toc Repository: rL LLVM https://review

[PATCH] D27180: Testbed and skeleton of a new expression parser

2016-11-29 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. That's excellent. Thank you for this work, Sean! Comment at: tools/clang-import-test/CMakeLists.txt:19 + ) \ No newline at end of file Please add a newline here. Comment at: tools/clang-import-test/clang-import-te

[PATCH] D27181: [ASTImporter] Support for importing UsingDecl and UsingShadowDecl

2016-11-29 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Thank you Kareem, It looks mostly good, but I'd like to have some functional tests in ASTMerge for this patch. Comment at: lib/AST/ASTImporter.cpp:4299 + if (ImportDeclParts(D, DC, LexicalDC, Name, AlreadyImported, Loc)) +return NULL; + assert(

r288163 - [OpenCL] Prevent generation of globals in non-constant AS for OpenCL.

2016-11-29 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Tue Nov 29 11:01:19 2016 New Revision: 288163 URL: http://llvm.org/viewvc/llvm-project?rev=288163&view=rev Log: [OpenCL] Prevent generation of globals in non-constant AS for OpenCL. Avoid using shortcut for const qualified non-constant address space aggregate variables while

[PATCH] D27095: Protect std::array tests under noexceptions

2016-11-29 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 updated this revision to Diff 79589. rogfer01 added a comment. Add missing assertions in the original test. https://reviews.llvm.org/D27095 Files: test/std/containers/sequences/array/at.pass.cpp Index: test/std/containers/sequences/array/at.pass.cpp

[PATCH] D26960: [docs] Use x86_64 and i386 instead of x86 as arch for triples.

2016-11-29 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Ping. This is a two-line documentation fix, but I want to make sure x86_64 and i386 are valid for arch in target triples in all cases. https://reviews.llvm.org/D26960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D27095: Protect std::array tests under noexceptions

2016-11-29 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288165: Protect std::array tests under noexceptions (authored by rogfer01). Changed prior to commit: https://reviews.llvm.org/D27095?vs=79589&id=79591#toc Repository: rL LLVM https://reviews.llvm.or

[libcxx] r288165 - Protect std::array tests under noexceptions

2016-11-29 Thread Roger Ferrer Ibanez via cfe-commits
Author: rogfer01 Date: Tue Nov 29 11:10:29 2016 New Revision: 288165 URL: http://llvm.org/viewvc/llvm-project?rev=288165&view=rev Log: Protect std::array tests under noexceptions Skip tests that expect exceptions be thrown. Also add missing asserts. Differential Revision: https://reviews.llvm.or

Re: Embedded Bitcode in Object Files

2016-11-29 Thread Nico Weber via cfe-commits
It looks like patches 1 and 2 made it but 3 and 4 didn't. Do you no longer need them? On Mon, Feb 29, 2016 at 2:08 PM, Steven Wu via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Ping. I don't know who is the best review for the patches. Thanks for > Rafael looking at the LLVM change. Richa

[PATCH] D26991: Remove unused code

2016-11-29 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added inline comments. Comment at: libcxx/include/algorithm:1499 +// Load the first element from __first2 outside the loop because it is loop invariant +typename iterator_traits<_RandomAccessIterator1>::value_type __firstElement2 = *__first2; + ---

[PATCH] D27181: [ASTImporter] Support for importing UsingDecl and UsingShadowDecl

2016-11-29 Thread Sean Callanan via Phabricator via cfe-commits
spyffe added a comment. Looks good, but I have a concern about the underlying branch's apparently inconsistent initialization of `DeclarationNameInfo`. Aleksei, could you clarify how that code works? Should we have a helper function so we don't have to carefully repeat this pattern everywhere

[PATCH] D27033: [ASTImporter] Support importing UnresolvedLookupExpr nodes

2016-11-29 Thread Sean Callanan via Phabricator via cfe-commits
spyffe added a comment. Marked the place I was talking about in D27181 Comment at: lib/AST/ASTImporter.cpp:6489 + DeclarationNameInfo NameInfo(E->getName(), E->getNameLoc()); + ImportDeclarationNameLoc(E->getNameInfo(), NameInfo); + -

[PATCH] D26916: [ObjC] Avoid a @try/@finally/@autoreleasepool fixit when parsing an expression

2016-11-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Thanks for the explanation, LGTM Repository: rL LLVM https://reviews.llvm.org/D26916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D27180: Testbed and skeleton of a new expression parser

2016-11-29 Thread Sean Callanan via Phabricator via cfe-commits
spyffe added a comment. In https://reviews.llvm.org/D27180#607433, @hfinkel wrote: > This seems like a great idea. btw, do you know about Cling > (https://root.cern.ch/cling)? Hal, thank you for your interest! Yes, Cling is what I was referring to when I mentioned the ROOT project. Vassil V

[PATCH] D21695: [clang] Version support for UBSan handlers

2016-11-29 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Ping! https://reviews.llvm.org/D21695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r288175 - Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC).

2016-11-29 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Tue Nov 29 12:24:01 2016 New Revision: 288175 URL: http://llvm.org/viewvc/llvm-project?rev=288175&view=rev Log: Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC). This preparation to remove SetVector.h dependency on S

Re: Upgrade and fix clang-format-vs

2016-11-29 Thread Hans Wennborg via cfe-commits
Very nice! I've tried this out and confirmed that the built plugin also works with older Visual Studio versions. Some comments below: > --- /dev/null > +++ b/tools/clang-format-vs/.gitignore > @@ -0,0 +1,11 @@ > +# Visual Studio files > +.vs/ > +/packages/ > +/ClangFormat/obj/ > +/ClangFormat/bin

[PATCH] D27180: Testbed and skeleton of a new expression parser

2016-11-29 Thread Sean Callanan via Phabricator via cfe-commits
spyffe marked 11 inline comments as done. spyffe added a comment. Thank you, Alex! I've responded in a few places inline below, and will update this patch momentarily. Comment at: tools/clang-import-test/clang-import-test.cpp:106 + +const char *LineEnd = nullptr; + --

[PATCH] D27180: Testbed and skeleton of a new expression parser

2016-11-29 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 79605. spyffe marked 2 inline comments as done. spyffe added a comment. Updated to reflect Aleksei's comments. Repository: rL LLVM https://reviews.llvm.org/D27180 Files: test/Import/empty-struct/Inputs/S.c test/Import/empty-struct/test.c tools/CMake

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-11-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Comment at: docs/clang-tidy/checks/misc-string-compare.rst:8 + +A common mistake is to use the string's compare method instead of using the +equality or inequality opera

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-11-29 Thread Mads Ravn via Phabricator via cfe-commits
madsravn removed rL LLVM as the repository for this revision. madsravn updated this revision to Diff 79610. madsravn added a comment. Updated the patch to include changes suggested by comments. https://reviews.llvm.org/D27210 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscStringC

[PATCH] D21695: [clang] Version support for UBSan handlers

2016-11-29 Thread Vedant Kumar via Phabricator via cfe-commits
vsk accepted this revision. vsk added a reviewer: vsk. vsk added a comment. This revision is now accepted and ready to land. Thanks for working on this. LGTM with a nit. Comment at: lib/CodeGen/CGExpr.cpp:2506 + assert(CheckHandler >= 0 && + CheckHandler < sizeof(Sanit

r288193 - Support constant expression evaluation for wchar_t versions of simple string

2016-11-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Nov 29 13:45:17 2016 New Revision: 288193 URL: http://llvm.org/viewvc/llvm-project?rev=288193&view=rev Log: Support constant expression evaluation for wchar_t versions of simple string functions, in order to support constexpr std::char_traits. Modified: cfe/trunk/incl

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-11-29 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. Please run clang-format on all new files. Comment at: test/clang-tidy/misc-string-compare.cpp:3 + +#include + clang-tidy tests don't #include system headers. Declare the bits you need instead. See test/clang-tidy/misc-string-co

[PATCH] D27049: [OpenCL] Refactor out ReadPipe/WritePipe

2016-11-29 Thread Yaron Keren via Phabricator via cfe-commits
yaron.keren accepted this revision. yaron.keren added a comment. This revision is now accepted and ready to land. LGTM after fixing the inline comment Comment at: lib/Serialization/ASTReader.cpp:5804 QualType ElementType = readType(*Loc.F, Record, Idx); -return Context

Re: Upgrade and fix clang-format-vs

2016-11-29 Thread Hans Wennborg via cfe-commits
On Tue, Nov 29, 2016 at 12:01 PM, Antonio Maiorano wrote: > On Tue, 29 Nov 2016 at 13:42 Hans Wennborg wrote: >> >> Very nice! I've tried this out and confirmed that the built plugin >> also works with older Visual Studio versions. >> >> Some comments below: >> >> > --- /dev/null >> > +++ b/tools

r288197 - Don't declare IsEnumDeclComplete as extern

2016-11-29 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Nov 29 14:46:24 2016 New Revision: 288197 URL: http://llvm.org/viewvc/llvm-project?rev=288197&view=rev Log: Don't declare IsEnumDeclComplete as extern Otherwise MSVC and clang-cl will see "extern inline" after merging redeclarations and emit it in all TUs that include Type.h

[PATCH] D26920: [libc++] Add validation to Stage 2 of num_get

2016-11-29 Thread Eric van Gyzen via Phabricator via cfe-commits
vangyzen updated this revision to Diff 79625. vangyzen added a comment. Herald added a subscriber: emaste. Restore support for a sign character preceding a "nan" I accidentally broke +nan and -nan. Add unit test cases for these, and update my change to support them. https://reviews.llvm.org/D2

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-11-29 Thread Mads Ravn via Phabricator via cfe-commits
madsravn updated this revision to Diff 79624. madsravn added a comment. Updated per comments https://reviews.llvm.org/D27210 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/StringCompareCheck.cpp clang-tidy/misc/StringCompareCheck.h docs/Releas

[PATCH] D26979: Do not hard-code locale data in unit tests: get it from the OS instead

2016-11-29 Thread Eric van Gyzen via Phabricator via cfe-commits
vangyzen added a comment. @EricWF Do you have time and interest to review this again? https://reviews.llvm.org/D26979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-11-29 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 79627. malcolm.parsons added a comment. Handle templated member functions too. https://reviews.llvm.org/D27166 Files: clang-tidy/modernize/UseAutoCheck.cpp docs/clang-tidy/checks/modernize-use-auto.rst test/clang-tidy/modernize-use-auto-cast-r

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-11-29 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons marked an inline comment as done. malcolm.parsons added a comment. In https://reviews.llvm.org/D27166#606772, @Eugene.Zelenko wrote: > It'll be worth to mention enhancement in Release Notes. They already say this: - The `modernize-use-auto

[PATCH] D25435: Add -femit-accurate-debug-info to emit more debug info for sample pgo profile collection

2016-11-29 Thread Dehao Chen via Phabricator via cfe-commits
danielcdh updated this revision to Diff 79629. danielcdh marked an inline comment as done. danielcdh added a comment. Change the flag to -fprof-debug, which is more concise. The flag name is still open for discussion. https://reviews.llvm.org/D25435 Files: include/clang/Driver/Options.td i

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-11-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D27166#608339, @malcolm.parsons wrote: > In https://reviews.llvm.org/D27166#606772, @Eugene.Zelenko wrote: > > > It'll be worth to mention enhancement in Release Notes. > > > They already say this: > > - The `modernize-use-auto >

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-11-29 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 79632. malcolm.parsons added a comment. Add to release notes https://reviews.llvm.org/D27166 Files: clang-tidy/modernize/UseAutoCheck.cpp docs/ReleaseNotes.rst docs/clang-tidy/checks/modernize-use-auto.rst test/clang-tidy/modernize-use-auto-

  1   2   >