r316152 - Fix a few nits in RenamingAction.

2017-10-19 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Oct 19 01:20:55 2017 New Revision: 316152 URL: http://llvm.org/viewvc/llvm-project?rev=316152=rev Log: Fix a few nits in RenamingAction. * Add missing override keyword. * avoid unnecessary copy of std::string. Modified:

[PATCH] D39083: [CodeGen] Fix generation of TBAA info for array-to-pointer conversions

2017-10-19 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev created this revision. kosarev added a project: clang. Resolves: Fatal error: Offset not zero at the point of scalar access. http://llvm.org/PR34992 Repository: rL LLVM https://reviews.llvm.org/D39083 Files: lib/CodeGen/CGExpr.cpp test/CodeGen/tbaa-array.cpp Index:

[PATCH] D39086: Performance tracing facility for clangd.

2017-10-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. Herald added a subscriber: mgorny. This lets you visualize clangd's activity on different threads over time, and understand critical paths of requests and object lifetimes. The data produced can be visualized in Chrome (at chrome://tracing), or in a standalone

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-19 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 119553. JonasToth added a comment. - Improve docs, grammar https://reviews.llvm.org/D37808 Files: clang-tidy/hicpp/CMakeLists.txt clang-tidy/hicpp/HICPPTidyModule.cpp clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp

[PATCH] D38694: [ASTImporter] Support importing CXXUnresolvedConstructExpr and UnresolvedLookupExpr

2017-10-19 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/AST/ASTImporter.cpp:5476 + + for (unsigned ai = 0, ae = NumArgs; ai != ae; ++ai) { +Expr *FromArg = CE->getArg(ai); Use uppercase variable names. Comment at: lib/AST/ASTImporter.cpp:5477 +

r316149 - [Headers] Fix typoed __ARM_DWARF_EH__ ifdefs

2017-10-19 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Thu Oct 19 00:40:45 2017 New Revision: 316149 URL: http://llvm.org/viewvc/llvm-project?rev=316149=rev Log: [Headers] Fix typoed __ARM_DWARF_EH__ ifdefs These typos appeared in SVN r309226 and r309327. Modified: cfe/trunk/lib/Headers/unwind.h Modified:

[PATCH] D38845: [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, DependentScopeDeclRefExpr

2017-10-19 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/AST/ASTImporter.cpp:5500 + + TemplateArgumentListInfo ToTAInfo; + TemplateArgumentListInfo *ResInfo = nullptr; According to phabricator this code is very similar to a snippet starting from line 4524 and some

[PATCH] D38171: Implement clang-tidy check aliases.

2017-10-19 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. One problem to think about when we add all clang-diagnostic as "first or second" class citizen, `checkes=*` might now enable all the warnings which make no sense and might be surprising to the users. What do you think? https://reviews.llvm.org/D38171

[PATCH] D38921: [analyzer] LoopUnrolling: update the matched assignment operators

2017-10-19 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Core/LoopUnrolling.cpp:100 declRefExpr(to(varDecl(VarNodeMatcher)), binaryOperator(anyOf(hasOperatorName("="), hasOperatorName("+="),

[PATCH] D38843: [ASTImporter] Support importing CXXPseudoDestructorExpr

2017-10-19 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/AST/ASTImporter.cpp:5549 + Expr *BaseE = Importer.Import(E->getBase()); + if (!BaseE) +return nullptr; Does `E->getBase()` guaranteed to return non-null? What happens when this node was constructed using

[PATCH] D39086: Performance tracing facility for clangd.

2017-10-19 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. lgtm https://reviews.llvm.org/D39086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D38845: [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, DependentScopeDeclRefExpr

2017-10-19 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/AST/ASTImporter.cpp:5500 + + TemplateArgumentListInfo ToTAInfo; + TemplateArgumentListInfo *ResInfo = nullptr; szepet wrote: > xazax.hun wrote: > > According to phabricator this code is very similar to a snippet

[PATCH] D39049: [analyzer] Fix wrong calculation of offset in ArrayBoundsV2

2017-10-19 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I checked what happens: The checker would like to solve the following (I inspect the branch when x == 0 ): `((reg_$1) + 1) * 4 <= 0` The `getSimplifiedOffsets` function kicks in and simplifies the expression above to the following: `(reg_$1) <= -1` The analyzer

[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

2017-10-19 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. LGTM! https://reviews.llvm.org/D37187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36471: [StaticAnalyzer] Try to calculate arithmetic result when operand has a range of possible values

2017-10-19 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a subscriber: NoQ. xazax.hun added a comment. I think this change is very useful but it is also important to get these changes right. I think one of the main reason you did not get review comments yet is that it is not easy to verify that these changes are sound. In general,

[PATCH] D39048: Dump signed integers in SymIntExpr and IntSymExpr correctly

2017-10-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316157: [analyzer] Dump signed integers in SymIntExpr and IntSymExpr correctly (authored by xazax). Changed prior to commit: https://reviews.llvm.org/D39048?vs=119466=119569#toc Repository: rL LLVM

r316157 - [analyzer] Dump signed integers in SymIntExpr and IntSymExpr correctly

2017-10-19 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Thu Oct 19 04:58:21 2017 New Revision: 316157 URL: http://llvm.org/viewvc/llvm-project?rev=316157=rev Log: [analyzer] Dump signed integers in SymIntExpr and IntSymExpr correctly Patch by: Adam Balogh! Differential Revision: https://reviews.llvm.org/D39048 Modified:

[PATCH] D39086: Performance tracing facility for clangd.

2017-10-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Looks good in general. A few nits. Comment at: clangd/JSONRPCDispatcher.cpp:230 - // Finally, execute the action for this JSON message. - if (!Dispatcher.call(JSONRef, Out)) -Out.log("JSON dispatch failed!\n"); + { +//

Re: r315811 - Re-land r315787, "[Sema] Warn about unused variables if we can constant evaluate the initializer."

2017-10-19 Thread Alexander Kornienko via cfe-commits
A reduced test case: struct a { a(const char *); }; template void c() { a d(b::e ? "" : ""); } On Thu, Oct 19, 2017 at 5:57 PM, Benjamin Kramer wrote: > We should check VD->getInit()->isValueDependent() before we call > evaluateValue. I wasn't able to come up with a

[PATCH] D38578: [preamble] Also record the "skipping" state of the preprocessor

2017-10-19 Thread Cameron via Phabricator via cfe-commits
cameron314 added a comment. @nik, pretty sure this fix I submitted ages ago fixes that. Been using it in production a couple years. Would be nice if someone reviewed it so we could finally upstream it. https://reviews.llvm.org/D38578

[PATCH] D39105: Patch bug 27628 (clang-tidy should exit with a failure code when there are errors)

2017-10-19 Thread Antoni via Phabricator via cfe-commits
antoyo created this revision. Update clang-tidy to return 1 when there's an error. https://reviews.llvm.org/D39105 Files: clang-tidy/tool/ClangTidyMain.cpp Index: clang-tidy/tool/ClangTidyMain.cpp === ---

[PATCH] D38820: [CGExprScalar] Add missing types in function GetIntrinsic

2017-10-19 Thread Guozhi Wei via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316179: [CGExprScalar] Add missing types in function GetIntrinsic (authored by Carrot). Changed prior to commit: https://reviews.llvm.org/D38820?vs=118680=119613#toc Repository: rL LLVM

[PATCH] D38667: AMDGPU: Parse r600 CPU name early and expose FMAF capability

2017-10-19 Thread Jan Vesely via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316181: AMDGPU: Parse r600 CPU name early and expose FMAF capability (authored by jvesely). Changed prior to commit: https://reviews.llvm.org/D38667?vs=118136=119614#toc Repository: rL LLVM

r316184 - These attributes are supported by GCC with the gnu vendor namespace for C++11-style attributes. Enabling the gnu namespace by switching to the GCC spelling.

2017-10-19 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Oct 19 14:09:39 2017 New Revision: 316184 URL: http://llvm.org/viewvc/llvm-project?rev=316184=rev Log: These attributes are supported by GCC with the gnu vendor namespace for C++11-style attributes. Enabling the gnu namespace by switching to the GCC spelling.

[PATCH] D39104: Allow /showIncludes with /P

2017-10-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. r213589 was checked in as a solution to https://bugs.llvm.org/show_bug.cgi?id=20336. However, it is possible to use /EP with /P to suppress #line directives AND output to a file. There is no reason in that case to suppress /showIncludes. This was reported

r316177 - [Sema] Fix assertion failure when checking for unused variables in a dependent context.

2017-10-19 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Oct 19 12:07:13 2017 New Revision: 316177 URL: http://llvm.org/viewvc/llvm-project?rev=316177=rev Log: [Sema] Fix assertion failure when checking for unused variables in a dependent context. Modified: cfe/trunk/lib/Sema/SemaDecl.cpp

r316181 - AMDGPU: Parse r600 CPU name early and expose FMAF capability

2017-10-19 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Thu Oct 19 13:40:13 2017 New Revision: 316181 URL: http://llvm.org/viewvc/llvm-project?rev=316181=rev Log: AMDGPU: Parse r600 CPU name early and expose FMAF capability Improve amdgcn macro test Differential Revision: https://reviews.llvm.org/D38667 Modified:

r316186 - These attributes are not supported by GCC and should not be in the gnu namespace. Switching from the GCC spelling to the GNU spelling so that they are only supported with __attribute__(()).

2017-10-19 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Oct 19 14:20:28 2017 New Revision: 316186 URL: http://llvm.org/viewvc/llvm-project?rev=316186=rev Log: These attributes are not supported by GCC and should not be in the gnu namespace. Switching from the GCC spelling to the GNU spelling so that they are only

Re: Patch bug 27628 (clang-tidy should exit with a failure code when there are errors)

2017-10-19 Thread Alexander Kornienko via cfe-commits
The patch was lost. Could you re-attach it or even better upload to reviews.llvm.org as described in http://llvm.org/docs/Phabricator.html? Please make sure the patch applies cleanly to the current HEAD. Thanks! On Tue, Oct 17, 2017 at 9:10 PM, Friedman, Eli wrote: >

Re: r315811 - Re-land r315787, "[Sema] Warn about unused variables if we can constant evaluate the initializer."

2017-10-19 Thread Benjamin Kramer via cfe-commits
Fixed in r316177. On Thu, Oct 19, 2017 at 5:57 PM, Benjamin Kramer wrote: > We should check VD->getInit()->isValueDependent() before we call > evaluateValue. I wasn't able to come up with a test case that triggers > the assert though :( > > On Thu, Oct 19, 2017 at 5:45 PM,

r316179 - [CGExprScalar] Add missing types in function GetIntrinsic

2017-10-19 Thread Guozhi Wei via cfe-commits
Author: carrot Date: Thu Oct 19 13:11:23 2017 New Revision: 316179 URL: http://llvm.org/viewvc/llvm-project?rev=316179=rev Log: [CGExprScalar] Add missing types in function GetIntrinsic In function GetIntrinsic, not all types are covered. Types double and long long are missed, type long is

[PATCH] D39092: [clang-refactor] Add "-Inplace" option to the commandline tool.

2017-10-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Change clang-refactor default behavior to print the new code after refactoring (instead of editing the source files), which would make it easier to use and debug the refactoring action. https://reviews.llvm.org/D39092 Files:

[PATCH] D38843: [ASTImporter] Support importing CXXPseudoDestructorExpr

2017-10-19 Thread Peter Szecsi via Phabricator via cfe-commits
szepet added inline comments. Comment at: lib/AST/ASTImporter.cpp:5549 + Expr *BaseE = Importer.Import(E->getBase()); + if (!BaseE) +return nullptr; xazax.hun wrote: > Does `E->getBase()` guaranteed to return non-null? What happens when this > node was

[PATCH] D38843: [ASTImporter] Support importing CXXPseudoDestructorExpr

2017-10-19 Thread Peter Szecsi via Phabricator via cfe-commits
szepet updated this revision to Diff 119579. szepet added a comment. Checking for importing base updated to (!Imported && From) style. https://reviews.llvm.org/D38843 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp Index: unittests/AST/ASTImporterTest.cpp

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-10-19 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 119576. baloghadamsoftware added a comment. Herald added a subscriber: szepet. I think it is the final attempt. If Symbols are different, the type is extended, so we store a correct (but extended) range. However, if the Symbols are the same, we

[PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 119580. ioeric added a comment. - Remove unused variable. - Narrow supported actions to FrontendActionFactory from ToolAction. https://reviews.llvm.org/D34272 Files: include/clang/Tooling/CommonOptionsParser.h include/clang/Tooling/Execution.h

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2017-10-19 Thread Jiří Zárevúcky via Phabricator via cfe-commits
jzr added a comment. On a related note, would it be difficult to add support for custom spacing between the macro name and definition? In the HelenOS project, we have definitions aligned two spaces after the longest name. Repository: rL LLVM https://reviews.llvm.org/D28462

r316193 - Try to shorten system header paths when using -MD depfiles

2017-10-19 Thread Peter Wu via cfe-commits
Author: lekensteyn Date: Thu Oct 19 16:53:27 2017 New Revision: 316193 URL: http://llvm.org/viewvc/llvm-project?rev=316193=rev Log: Try to shorten system header paths when using -MD depfiles GCC tries to shorten system headers in depfiles using its real path (resolving components like ".." and

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2017-10-19 Thread Jiří Zárevúcky via Phabricator via cfe-commits
jzr added a comment. I happen to need this functionality as well. What's the progress? Is there anything I can do to help it along? Repository: rL LLVM https://reviews.llvm.org/D28462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r316195 - Revert r316193.

2017-10-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 19 17:25:07 2017 New Revision: 316195 URL: http://llvm.org/viewvc/llvm-project?rev=316195=rev Log: Revert r316193. This patch breaks users using -fno-canonical-prefixes, for whom resolving symlinks is not acceptable. Removed:

[libcxx] r316191 - Fix an unsigned integer overflow in regex that lead to a bad memory access. Found by OSS-Fuzz

2017-10-19 Thread Marshall Clow via cfe-commits
Author: marshall Date: Thu Oct 19 15:10:41 2017 New Revision: 316191 URL: http://llvm.org/viewvc/llvm-project?rev=316191=rev Log: Fix an unsigned integer overflow in regex that lead to a bad memory access. Found by OSS-Fuzz Modified: libcxx/trunk/include/regex

[PATCH] D37954: Try to shorten system header paths when using -MD depfiles

2017-10-19 Thread Peter Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316193: Try to shorten system header paths when using -MD depfiles (authored by Lekensteyn). Changed prior to commit: https://reviews.llvm.org/D37954?vs=115946=119626#toc Repository: rL LLVM

[PATCH] D39075: Fix nodiscard for volatile references

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

Re: r315811 - Re-land r315787, "[Sema] Warn about unused variables if we can constant evaluate the initializer."

2017-10-19 Thread Alexander Kornienko via cfe-commits
On Sat, Oct 14, 2017 at 5:59 PM, Benjamin Kramer via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: d0k > Date: Sat Oct 14 08:59:34 2017 > New Revision: 315811 > > URL: http://llvm.org/viewvc/llvm-project?rev=315811=rev > Log: > Re-land r315787, "[Sema] Warn about unused variables if

[PATCH] D39042: [Tooling] Add a factory method for CommonOptionsParser

2017-10-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 119583. ioeric added a comment. - Make the factory method return an expected object instead of unique_ptr. - clang-format code. https://reviews.llvm.org/D39042 Files: include/clang/Tooling/CommonOptionsParser.h lib/Tooling/CommonOptionsParser.cpp

[PATCH] D39031: [Analyzer] Correctly handle parameters passed by reference when bodyfarming std::call_once

2017-10-19 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a reviewer: danielmarjamaki. danielmarjamaki added a comment. Stylistically this looks pretty good to me. Just a minor nit. Comment at: lib/Analysis/BodyFarm.cpp:389 + for (unsigned int i = 2; i < D->getNumParams(); i++) { + +const ParmVarDecl *PDecl

[PATCH] D37954: Try to shorten system header paths when using -MD depfiles

2017-10-19 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn added a comment. In https://reviews.llvm.org/D37954#901878, @rsmith wrote: > In https://reviews.llvm.org/D37954#884029, @Lekensteyn wrote: > > > Any objection for merging these patches? I rebased today (no changes > > needed) and it still passes clang-tests. > > > This is not the way

r316204 - Basic: restore {,u}intptr_t on NetBSD/ARM

2017-10-19 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Thu Oct 19 21:11:28 2017 New Revision: 316204 URL: http://llvm.org/viewvc/llvm-project?rev=316204=rev Log: Basic: restore {,u}intptr_t on NetBSD/ARM NetBSD uses `long int` for `intptr_t` on ARM. This was changed in SVN r316046, referenced against other compilers.

[PATCH] D38101: [Sema] Diagnose tautological comparison with type's min/max values

2017-10-19 Thread mattias.v.eriks...@ericsson.com via Phabricator via cfe-commits
materi added a comment. Hi! After this patch I started to see warnings: e.c:8:23: warning: integer constant not in range of enumerated type 'enum E' [-Wassign-enum] enum E {a = 7,} e = 1000; ^ e.c:10:12: warning: comparison 'enum E' > 7 is always false

[PATCH] D39086: Performance tracing facility for clangd.

2017-10-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 119562. sammccall marked 3 inline comments as done. sammccall added a comment. Address review comments. https://reviews.llvm.org/D39086 Files: clangd/CMakeLists.txt clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd/JSONRPCDispatcher.cpp

[PATCH] D39086: Performance tracing facility for clangd.

2017-10-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/JSONRPCDispatcher.cpp:230 - // Finally, execute the action for this JSON message. - if (!Dispatcher.call(JSONRef, Out)) -Out.log("JSON dispatch failed!\n"); + { +// Finally, execute the action

[PATCH] D38845: [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, DependentScopeDeclRefExpr

2017-10-19 Thread Peter Szecsi via Phabricator via cfe-commits
szepet added inline comments. Comment at: lib/AST/ASTImporter.cpp:5500 + + TemplateArgumentListInfo ToTAInfo; + TemplateArgumentListInfo *ResInfo = nullptr; xazax.hun wrote: > According to phabricator this code is very similar to a snippet starting from >

Re: r315811 - Re-land r315787, "[Sema] Warn about unused variables if we can constant evaluate the initializer."

2017-10-19 Thread Benjamin Kramer via cfe-commits
We should check VD->getInit()->isValueDependent() before we call evaluateValue. I wasn't able to come up with a test case that triggers the assert though :( On Thu, Oct 19, 2017 at 5:45 PM, Alexander Kornienko wrote: > > > On Sat, Oct 14, 2017 at 5:59 PM, Benjamin Kramer via

r316166 - Fix nodiscard for volatile references

2017-10-19 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Thu Oct 19 08:58:58 2017 New Revision: 316166 URL: http://llvm.org/viewvc/llvm-project?rev=316166=rev Log: Fix nodiscard for volatile references As reported here https://bugs.llvm.org/show_bug.cgi?id=34988 [[nodiscard]] warnings were not being suppressed for volatile-ref

[PATCH] D39042: [Tooling] Add a factory method for CommonOptionsParser

2017-10-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. Still LGTM. https://reviews.llvm.org/D39042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r316152 - Fix a few nits in RenamingAction.

2017-10-19 Thread Alex L via cfe-commits
Thanks! On 19 October 2017 at 01:20, Haojian Wu via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: hokein > Date: Thu Oct 19 01:20:55 2017 > New Revision: 316152 > > URL: http://llvm.org/viewvc/llvm-project?rev=316152=rev > Log: > Fix a few nits in RenamingAction. > > * Add missing

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-10-19 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. I like this patch overall.. here are some stylistic nits. Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:610 +} else { + if (*lInt >= *rInt) { +newRhsExt = lInt->getExtValue() -

[PATCH] D39075: Fix nodiscard for volatile references

2017-10-19 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316166: Fix nodiscard for volatile references (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D39075?vs=119535=119588#toc Repository: rL LLVM

r316165 - [AMDGPU] Fix bug in enqueued block codegen due to an extra line

2017-10-19 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Oct 19 08:56:13 2017 New Revision: 316165 URL: http://llvm.org/viewvc/llvm-project?rev=316165=rev Log: [AMDGPU] Fix bug in enqueued block codegen due to an extra line Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp

[PATCH] D38986: [Analyzer] Better unreachable message in enumeration

2017-10-19 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. > I think it is much better when the assert failure tells the developer _what_ > value is failing, rather than saying "oops we are dead". yes of course, more informative assert messages is better. https://reviews.llvm.org/D38986

[PATCH] D39015: [Analyzer] Always use non-reference types when creating expressions in BodyFarm, removes std::call_once crash

2017-10-19 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added inline comments. Comment at: cfe/trunk/lib/Analysis/BodyFarm.cpp:139 -DeclRefExpr *ASTMaker::makeDeclRefExpr(const VarDecl *D, - bool RefersToEnclosingVariableOrCapture, - bool

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

2017-10-19 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki updated this revision to Diff 119590. danielmarjamaki added a comment. Herald added a subscriber: szepet. As suggested, use a ProgramState trait to detect VLA overflows. I did not yet manage to get a SubRegion from the DeclStmt that matches the location SubRegion. Therefore I am

[PATCH] D39083: [CodeGen] Fix generation of TBAA info for array-to-pointer conversions

2017-10-19 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel accepted this revision. hfinkel added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D39083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D39092: [clang-refactor] Add "-Inplace" option to the commandline tool.

2017-10-19 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/D39092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D26244: [Driver] Add CLANG_PREFER_GCC_LIBRARIES which can be disabled

2017-10-19 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld abandoned this revision. Hahnfeld added a comment. Abandoning as I lost interest in this. https://reviews.llvm.org/D26244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38101: [Sema] Diagnose tautological comparison with type's min/max values

2017-10-19 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D38101#901709, @materi wrote: > Hi! Hi. > After this patch I started to see warnings: Thank you for the report! > e.c:8:23: warning: integer constant not in range of enumerated type 'enum > E' [-Wassign-enum] > enum E {a = 7,} e

[libcxx] r316172 - Fix UB - signed integer overflow in regex. Thanks to Tim Shen for the patch. Reviewed as https://reviews.llvm.org/D39066

2017-10-19 Thread Marshall Clow via cfe-commits
Author: marshall Date: Thu Oct 19 10:39:16 2017 New Revision: 316172 URL: http://llvm.org/viewvc/llvm-project?rev=316172=rev Log: Fix UB - signed integer overflow in regex. Thanks to Tim Shen for the patch. Reviewed as https://reviews.llvm.org/D39066 Added:

[PATCH] D39066: [libcxx, regex] Fix signed overflow when constructing integers from brace expressions.

2017-10-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D39066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D39066: [libcxx, regex] Fix signed overflow when constructing integers from brace expressions.

2017-10-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Committed as revision 316172. https://reviews.llvm.org/D39066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37954: Try to shorten system header paths when using -MD depfiles

2017-10-19 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D37954#884029, @Lekensteyn wrote: > Any objection for merging these patches? I rebased today (no changes needed) > and it still passes clang-tests. This is not the way that we do code review in LLVM and Clang. If you don't get a response to

[PATCH] D37954: Try to shorten system header paths when using -MD depfiles

2017-10-19 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. The behavior of sometimes transforming the path and sometimes not is IMO completely unacceptable. I don't care if GCC created that bug first. Repository: rL LLVM https://reviews.llvm.org/D37954 ___ cfe-commits mailing

[PATCH] D27607: [ubsan] Treat ObjC's BOOL as if its range is always {0, 1}

2017-10-19 Thread Francis Ricci via Phabricator via cfe-commits
fjricci added a comment. On platforms where `BOOL` == `signed char`, is it actually undefined behavior (or is it just bad programming practice) to store a value other than 0 or 1 in your `BOOL`? I can't find any language specs suggesting that it is, and given that it's just a typedef for a

[PATCH] D36347: Add new script to launch lldb and set breakpoints for diagnostics all diagnostics seen.

2017-10-19 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a subscriber: lldb-commits. zturner added a comment. One possible reason for why this never got any traction is that `lldb-commits` wasn't added as a subscriber. While it's true that the tagged people should have chimed in, having the whole commits list will get some more

[PATCH] D38680: [libunwind] Fix handling of DW_CFA_GNU_args_size

2017-10-19 Thread Will Dietz via Phabricator via cfe-commits
dtzWill added a comment. Wow, I've finally debugged some unwind failures to this on x86_64 Linux ... 1. Call-frame optimization introduces it 2. This fixes the cases I was investigating!! Thank you! https://reviews.llvm.org/D38680 ___ cfe-commits

[PATCH] D38680: [libunwind] Fix handling of DW_CFA_GNU_args_size

2017-10-19 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D38680#901892, @dtzWill wrote: > Wow, I've finally debugged some unwind failures to this on x86_64 Linux ... > > 1. Call-frame optimization introduces it > 2. This fixes the cases I was investigating!! That's good to hear! FWIW, I've talked