[PATCH] D33284: [CodeGen] Propagate LValueBaseInfo instead of AlignmentSource

2017-05-17 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz created this revision. The functions creating LValues propagated information about alignment source. Extend the propagated data to also include information about possible unrestricted aliasing. A new class LValueBaseInfo will contain both AlignmentSource and MayAlias info.

[PATCH] D33258: clang-cl: Fix path-based MSVC version detection

2017-05-17 Thread Hans Wennborg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303267: clang-cl: Fix path-based MSVC version detection (authored by hans). Changed prior to commit: https://reviews.llvm.org/D33258?vs=99213=99310#toc Repository: rL LLVM

r303267 - clang-cl: Fix path-based MSVC version detection

2017-05-17 Thread Hans Wennborg via cfe-commits
Author: hans Date: Wed May 17 10:27:44 2017 New Revision: 303267 URL: http://llvm.org/viewvc/llvm-project?rev=303267=rev Log: clang-cl: Fix path-based MSVC version detection The code wasn't taking the architecture-specific subdirectory into account. Differential Revision:

[PATCH] D32896: [OpenCL] Make CLK_NULL_RESERVE_ID invalid reserve id.

2017-05-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/Headers/opencl-c.h:16020 +// The macro CLK_NULL_RESERVE_ID refers to an invalid reservation ID. +#define CLK_NULL_RESERVE_ID (__builtin_astype((void *)0, reserve_id_t)) bool __ovld is_valid_reserve_id(reserve_id_t reserve_id);

[PATCH] D32524: [clang-format] Fix MatchingOpeningBlockLineIndex computation

2017-05-17 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. I don't have commit access, can someone please commit this patch? https://reviews.llvm.org/D32524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33270: [Frontend] Remove unused TemporaryFiles

2017-05-17 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. Kill it :) https://reviews.llvm.org/D33270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r303265 - [Frontend] Remove unused TemporaryFiles

2017-05-17 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Wed May 17 09:51:44 2017 New Revision: 303265 URL: http://llvm.org/viewvc/llvm-project?rev=303265=rev Log: [Frontend] Remove unused TemporaryFiles Summary: OnDiskData.TemporaryFiles is filled only by ASTUnit::addTemporaryFile, which is dead. Also these files are used

[PATCH] D33270: [Frontend] Remove unused TemporaryFiles

2017-05-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303265: [Frontend] Remove unused TemporaryFiles (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D33270?vs=99263=99306#toc Repository: rL LLVM

[PATCH] D33259: Don't defer to the GCC driver for linking arm-baremetal

2017-05-17 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs planned changes to this revision. jroelofs added inline comments. Comment at: cmake/caches/BaremetalARM.cmake:1 +set(LLVM_TARGETS_TO_BUILD ARM CACHE STRING "") + compnerd wrote: > Please rename this file to `BareMetalARMv6.cmake`. (I'm interested in

RE: Potential self-hosting failure

2017-05-17 Thread John Brawn via cfe-commits
I've now tracked this down to a problem with LEApcrel rematerialization where the rematerialized LEApcrel can address a different literal pool to the original. I've raised https://bugs.llvm.org/show_bug.cgi?id=33074 This is actually a bug that already existed before my patches, but because my

[PATCH] D32480: [clang-format] Add BinPackNamespaces option

2017-05-17 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added inline comments. Comment at: include/clang/Format/Format.h:153 + /// \endcode + bool AllowSemicolonAfterNamespace; + djasper wrote: > While I am not entirely opposed to this feature, I think it should be a > separate patch. I totally agree, which

[PATCH] D32896: [OpenCL] Make CLK_NULL_RESERVE_ID invalid reserve id.

2017-05-17 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/Headers/opencl-c.h:16020 +// The macro CLK_NULL_RESERVE_ID refers to an invalid reservation ID. +#define CLK_NULL_RESERVE_ID (__builtin_astype((void *)0, reserve_id_t)) bool __ovld is_valid_reserve_id(reserve_id_t reserve_id);

[PATCH] D33250: [Sema][ObjC] Fix a bug where -Wunguarded-availability was emitted at the wrong location

2017-05-17 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Hmm, I don't like how we end with a location that points to `x` instead of `InterWithProp`. Can we ignore the TypeLocs with invalid location and instead look at `ObjCPropertyRefExpr`s with a class receiver? https://reviews.llvm.org/D33250

[PATCH] D33250: [Sema][ObjC] Fix a bug where -Wunguarded-availability was emitted at the wrong location

2017-05-17 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: test/SemaObjC/unguarded-availability.m:141 +@interface InterWithProp // expected-note 2 {{marked partial here}} +@property int x; +@end Should this be `@property(class)`? https://reviews.llvm.org/D33250

Re: Potential self-hosting failure

2017-05-17 Thread Renato Golin via cfe-commits
On 17 May 2017 at 18:07, John Brawn wrote: > I've now tracked this down to a problem with LEApcrel rematerialization > where the rematerialized LEApcrel can address a different literal pool > to the original. I've raised https://bugs.llvm.org/show_bug.cgi?id=33074 Sounds

[PATCH] D33282: clang-format: fix prefix for doxygen comments after member

2017-05-17 Thread Francois Ferrand via Phabricator via cfe-commits
Typz created this revision. Herald added a subscriber: klimek. Doxygen supports putting documentation blocks after member, by adding an additional < marker in the comment block. This patch makes sure this marker is used in lines which are introduced by breaking the comment. int foo; ///< Some

[libcxx] r303268 - Mark the copy constructor and move

2017-05-17 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed May 17 10:30:01 2017 New Revision: 303268 URL: http://llvm.org/viewvc/llvm-project?rev=303268=rev Log: Mark the copy constructor and move constructor to be constexpr. This only works when the contained type has a constexpr copy/move ctor. Modified:

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-05-17 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz added a comment. I posted https://reviews.llvm.org/D33284 for the change from AlignmentSource to LValueBaseInfo. Repository: rL LLVM https://reviews.llvm.org/D31885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32896: [OpenCL] Make CLK_NULL_RESERVE_ID invalid reserve id.

2017-05-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/Headers/opencl-c.h:16020 +// The macro CLK_NULL_RESERVE_ID refers to an invalid reservation ID. +#define CLK_NULL_RESERVE_ID (__builtin_astype((void *)0, reserve_id_t)) bool __ovld is_valid_reserve_id(reserve_id_t reserve_id);

[PATCH] D33191: [analyzer] ObjCGenerics: account for __kindof specifiers met along a chain of casts.

2017-05-17 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp:464 ASTContext ) { + if (hasKindofArgs(StaticUpperBound)) { +// If the upper bound type has more __kindof specs, we drop all the info,

[PATCH] D33285: clang-format: do not reflow bullet lists

2017-05-17 Thread Francois Ferrand via Phabricator via cfe-commits
Typz created this revision. Herald added a subscriber: klimek. This patch prevents reflowing bullet lists in block comments. It handles all lists supported by doxygen and markdown, e.g. bullet lists starting with '-', '*', '+', as well as numbered lists starting with -# or a number followed by a

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-05-17 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. we are using this style at our company, not sure if it is used elsewhere; I will check. however, it seems to me that this behavior does not match the name of the option : AlignOperands does not align the operands anymore when BreakBeforeBinaryOperators is set... so, for

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-05-17 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added inline comments. Comment at: unittests/Format/FormatTest.cpp:2476 "bool value = a\n" - " + a\n" - " +

[PATCH] D33275: Keep into account if files were virtual.

2017-05-17 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Vassil, In which case specifically this trigger for you? I'm curious because we're sometimes hitting non-deterministic crashes in ComputeLineNumbers, wonder if it's related. Any chance you can come up with a testcase? https://reviews.llvm.org/D33275

[PATCH] D33278: [LLVM][x86][Inline Asm] - Enum support for MS syntax

2017-05-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Please consider using the monorepo to upload and submit this as a single patch. Comment at: include/llvm/MC/MCParser/MCAsmParser.h:64 unsigned ) = 0; + virtual bool EvaluateLookupAsEnum(void *LookupResult,int64_t ) =

[PATCH] D33277: [Clang][x86][Inline Asm] - Enum support for MS syntax

2017-05-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/Parse/ParseStmtAsm.cpp:100 + // result of a call to LookupInlineAsmIdentifier. + bool EvaluateLookupAsEnum(void *LookupResult, int64_t ) { +if (!LookupResult) return false; Please format this, clang-format will do

[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-05-17 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Thanks! A couple of minor comments below. Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:699 + // We cannot place diagnostics on autosynthesized code. + // Put them onto the call site through which we jumped into autosynthesized + // code

[PATCH] D33284: [CodeGen] Propagate LValueBaseInfo instead of AlignmentSource

2017-05-17 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:2256 Address(CapLVal.getPointer(), getContext().getDeclAlign(VD)), -CapLVal.getType(), AlignmentSource::Decl); +CapLVal.getType(), LValueBaseInfo(AlignmentSource::Decl,

[PATCH] D33290: [libcxx] [test] Remove workaround for C1XX conversion-to-nullptr bug

2017-05-17 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. VSO#391542 "Types can't be convertible to nullptr_t," which will be fixed in the next release of Visual C++. Also put internal bug numbers on the workarounds in test_workarounds.h for ease of correlation. https://reviews.llvm.org/D33290 Files:

[libcxx] r303281 - Make next/prev/advance/distance operations on iterators be constexpr. I missed this when I implemented the rest of P0031R0

2017-05-17 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed May 17 13:51:36 2017 New Revision: 303281 URL: http://llvm.org/viewvc/llvm-project?rev=303281=rev Log: Make next/prev/advance/distance operations on iterators be constexpr. I missed this when I implemented the rest of P0031R0 Modified:

[PATCH] D33290: [libcxx] [test] Remove workaround for C1XX conversion-to-nullptr bug

2017-05-17 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter updated this revision to Diff 99336. CaseyCarter added a comment. Commit the change to the affected test code as well. https://reviews.llvm.org/D33290 Files: test/support/poisoned_hash_helper.hpp test/support/test.workarounds/c1xx_broken_nullptr_conversion_operator.pass.cpp

[PATCH] D33290: [libcxx] [test] Remove workaround for C1XX conversion-to-nullptr bug

2017-05-17 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter marked an inline comment as done. CaseyCarter added inline comments. Comment at: test/support/test_workarounds.h:21 #if defined(TEST_COMPILER_C1XX) -# define TEST_WORKAROUND_C1XX_BROKEN_NULLPTR_CONVERSION_OPERATOR -# define

[PATCH] D33290: [libcxx] [test] Remove workaround for C1XX conversion-to-nullptr bug

2017-05-17 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added inline comments. Comment at: test/support/test_workarounds.h:21 #if defined(TEST_COMPILER_C1XX) -# define TEST_WORKAROUND_C1XX_BROKEN_NULLPTR_CONVERSION_OPERATOR -# define TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE Do you need to go update

[PATCH] D33284: [CodeGen] Propagate LValueBaseInfo instead of AlignmentSource

2017-05-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Generally looks great, thanks! Comment at: lib/CodeGen/CGBlocks.cpp:923 + MakeAddrLValue(blockField, type, + LValueBaseInfo(AlignmentSource::Decl, false)), /*captured by init*/ false);

[PATCH] D33284: [CodeGen] Propagate LValueBaseInfo instead of AlignmentSource

2017-05-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:2256 Address(CapLVal.getPointer(), getContext().getDeclAlign(VD)), -CapLVal.getType(), AlignmentSource::Decl); +CapLVal.getType(), LValueBaseInfo(AlignmentSource::Decl,

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-17 Thread Vitaly Buka via cfe-commits
On Tue, May 16, 2017 at 12:19 PM Richard Smith wrote: > On 16 May 2017 at 11:54, Vitaly Buka wrote: > >> The patch breaks this test >> http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/1349/steps/check-clang%20msan/logs/stdio

[PATCH] D33284: [CodeGen] Propagate LValueBaseInfo instead of AlignmentSource

2017-05-17 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz updated this revision to Diff 99353. kparzysz marked 2 inline comments as done. kparzysz added a comment. Changed the getNatural.*TypeAlignment to produce the entire LValueBaseInfo, assuming MayAlias to be false. Added merging of LValueBaseInfos. The merging assumes that the alignment

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-17 Thread Richard Smith via cfe-commits
I grabbed a clang binary from the build bot and have been trying to figure out what's gone wrong. So far it looks like the msan-enabled stage1 miscompiled some part of clang's lib/Lex/TokenLexer.cpp (but I'm not sure of that). It *looks* like TokenLexer::ExpandFunctionArguments is corrupting the

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-17 Thread Vitaly Buka via cfe-commits
And looks like "-w" is needed to trigger this. On Wed, May 17, 2017 at 1:43 PM Vitaly Buka wrote: > On Tue, May 16, 2017 at 12:19 PM Richard Smith > wrote: > >> On 16 May 2017 at 11:54, Vitaly Buka wrote: >> >>> The patch

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-17 Thread Vitaly Buka via cfe-commits
Actually it was not "-w" but -DCMAKE_BUILD_TYPE=Release Also now I am not sure that it was r302966. Looking. On Wed, May 17, 2017 at 2:15 PM Vitaly Buka wrote: > And looks like "-w" is needed to trigger this. > > On Wed, May 17, 2017 at 1:43 PM Vitaly Buka

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-05-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In https://reviews.llvm.org/D28952#757375, @iris wrote: > Thank you for helping me build clang with z3.I have already applied the above > updating.But now I have another question, when running clang with '-Xanalyzer > -analyzer-constraints=z3' there is always be a fatal

[PATCH] D33275: Keep into account if files were virtual.

2017-05-17 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. We have this pattern: FileID FID; const clang::FileEntry* FE = SM.getFileManager().getVirtualFile(source_name.str(), InputSize, 0 /* mod time*/); SM.overrideFileContents(FE, std::move(MB)); // MB is a

[PATCH] D33284: [CodeGen] Propagate LValueBaseInfo instead of AlignmentSource

2017-05-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D33284#757917, @kparzysz wrote: > Changed the getNatural.*TypeAlignment to produce the entire LValueBaseInfo, > assuming MayAlias to be false. > > Added merging of LValueBaseInfos. The merging assumes that the alignment > source in the

[PATCH] D33259: Don't defer to the GCC driver for linking arm-baremetal

2017-05-17 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: lib/Driver/ToolChains/BareMetal.h:42 + + const char *getDefaultLinker() const override { return "ld.lld"; } + compnerd wrote: > I think that this really should be `ld` still, as that is the canonical name > for the

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Any further comments? Thanks. https://reviews.llvm.org/D32248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33259: Don't defer to the GCC driver for linking arm-baremetal

2017-05-17 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 99350. https://reviews.llvm.org/D33259 Files: cmake/caches/BaremetalARM.cmake lib/Driver/CMakeLists.txt lib/Driver/Driver.cpp lib/Driver/ToolChains/BareMetal.cpp lib/Driver/ToolChains/BareMetal.h

[PATCH] D33259: Don't defer to the GCC driver for linking arm-baremetal

2017-05-17 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs marked 2 inline comments as done. jroelofs added inline comments. Comment at: lib/Driver/ToolChains/BareMetal.cpp:107-108 +ArgStringList ) const { + CmdArgs.push_back("-lc++"); + CmdArgs.push_back("-lc++abi"); +

[PATCH] D33207: Fix an assertion failure in FormatASTNodeDiagnosticArgument.

2017-05-17 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303325: Fix an assertion failure in FormatASTNodeDiagnosticArgument. (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D33207?vs=99112=99386#toc Repository: rL LLVM

[PATCH] D33304: [clang-tidy] Add a new module Android and a new check for file descriptors.

2017-05-17 Thread Yan Wang via Phabricator via cfe-commits
yawanng updated this revision to Diff 99374. yawanng added a comment. Add unit test file. https://reviews.llvm.org/D33304 Files: clang-tidy/CMakeLists.txt clang-tidy/android/AndroidTidyModule.cpp clang-tidy/android/CMakeLists.txt clang-tidy/android/FileDescriptorCheck.cpp

[PATCH] D33305: [ubsan] Add a check for pointer overflow UB

2017-05-17 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. Herald added a subscriber: krytarowski. Check pointer arithmetic for overflow. For some more background on this check, see: https://wdtz.org/catching-pointer-overflow-bugs.html https://reviews.llvm.org/D20322 Patch by Will Dietz and John Regehr! This version of

[PATCH] D33304: [clang-tidy] Add a new module Android and a new check for file descriptors.

2017-05-17 Thread Stephen Hines via Phabricator via cfe-commits
srhines added inline comments. Comment at: clang-tidy/android/FileDescriptorCheck.cpp:65 + +diag(FlagArg->getLocStart(), "open(), openat(), and open64() " + "must include O_CLOEXEC in their flags argument.") Use "%0 " instead of the 3 function

[PATCH] D33304: [clang-tidy] Add a new module Android and a new check for file descriptors.

2017-05-17 Thread Yan Wang via Phabricator via cfe-commits
yawanng created this revision. yawanng added a project: clang-tools-extra. Herald added subscribers: krytarowski, xazax.hun, mgorny, srhines. A common source of security bugs has been code that opens file descriptors without using the O_CLOEXEC flag. (Without that flag, an opened sensitive file

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-05-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 99392. ddcc added a comment. Address SVal simplification from https://reviews.llvm.org/D31886 https://reviews.llvm.org/D28953 Files: include/clang/StaticAnalyzer/Checkers/SValExplainer.h lib/StaticAnalyzer/Core/SValBuilder.cpp

[PATCH] D33207: Fix an assertion failure in FormatASTNodeDiagnosticArgument.

2017-05-17 Thread Richard Smith via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, thanks! https://reviews.llvm.org/D33207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33304: [clang-tidy] Add a new module Android and a new check for file descriptors.

2017-05-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please run clang-format over your code. Please add documentation and mention this check in docs/ReleaseNotes.rst (in alphabetical order). https://reviews.llvm.org/D33304 ___ cfe-commits mailing list

r303322 - [modules] Switch from inferring owning modules based on source location to

2017-05-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed May 17 21:29:20 2017 New Revision: 303322 URL: http://llvm.org/viewvc/llvm-project?rev=303322=rev Log: [modules] Switch from inferring owning modules based on source location to inferring based on the current module at the point of creation. This should result in no

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-17 Thread Jordan Rose via cfe-commits
Thanks, this is helpful! > On May 16, 2017, at 12:26, Richard Smith wrote: > > On 15 May 2017 at 10:28, Jordan Rose via cfe-commits > > wrote: > Hi, Richard. Swift was using this information in order to put

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-05-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. I've updated this revision to account for the recent SVal simplification commit by @NoQ, but now there is an exponential recursion problem that prevents testcase `PR24184.cpp` from terminating, due to an interaction between `Simplifier::VisitNonLocSymbolVal()` and

[PATCH] D33308: [analyzer]: Improve test handling with multiple constraint managers

2017-05-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc created this revision. Modify the test infrastructure to properly handle tests that require z3, and merge together the output of all tests on success. This is required for https://reviews.llvm.org/D28954. https://reviews.llvm.org/D33308 Files: test/Analysis/analyzer_test.py Index:

[clang-tools-extra] r303321 - [clang-tidy] Optimize GlobList::contains

2017-05-17 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed May 17 20:13:51 2017 New Revision: 303321 URL: http://llvm.org/viewvc/llvm-project?rev=303321=rev Log: [clang-tidy] Optimize GlobList::contains With large lists of checks and large number of warnings GlobList::contains starts being ridiculously CPU hungry, since it runs

r303320 - [Statistics] Use the new Statistic::updateMax to atomically calculate a maximum value statistic.

2017-05-17 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed May 17 20:11:52 2017 New Revision: 303320 URL: http://llvm.org/viewvc/llvm-project?rev=303320=rev Log: [Statistics] Use the new Statistic::updateMax to atomically calculate a maximum value statistic. Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp

r303317 - The constant expression evaluator should examine function arguments for non-constexpr function calls unless the EvalInfo says to stop.

2017-05-17 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Wed May 17 18:56:54 2017 New Revision: 303317 URL: http://llvm.org/viewvc/llvm-project?rev=303317=rev Log: The constant expression evaluator should examine function arguments for non-constexpr function calls unless the EvalInfo says to stop. Modified:

r303325 - Fix an assertion failure in FormatASTNodeDiagnosticArgument.

2017-05-17 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed May 17 22:02:15 2017 New Revision: 303325 URL: http://llvm.org/viewvc/llvm-project?rev=303325=rev Log: Fix an assertion failure in FormatASTNodeDiagnosticArgument. Summary: The test being added in this patch used to cause an assertion failure: /build/./bin/clang -cc1

[PATCH] D32449: Modifying PthreadLockChecker.cpp to reduce false positives.

2017-05-17 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 99388. malhar1995 marked an inline comment as done. malhar1995 added a comment. Cleaned up the previous patch. Added checking of LockState before initializing a mutex as well. Added separate branches of execution for PthreadSemantics and XNUSemantics.

[PATCH] D32428: Fix for Itanium mangler issue with templates (bug: 31405)

2017-05-17 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. David, could you please take a look to this patch. It fixes potential issue and should have no side effects. If you have no objections, I'll commit it for Serge. https://reviews.llvm.org/D32428 ___ cfe-commits

[PATCH] D33270: [Frontend] Remove unused TemporaryFiles

2017-05-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 99263. krasimir added a comment. - Remove unused method from the header file too https://reviews.llvm.org/D33270 Files: include/clang/Frontend/ASTUnit.h lib/Frontend/ASTUnit.cpp Index: lib/Frontend/ASTUnit.cpp

[PATCH] D33270: [Frontend] Remove unused TemporaryFiles

2017-05-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. OnDiskData.TemporaryFiles is filled only by ASTUnit::addTemporaryFile, which is dead. Also these files are used nowhere in the frontend nor in libclang. https://reviews.llvm.org/D33270 Files: include/clang/Frontend/ASTUnit.h lib/Frontend/ASTUnit.cpp Index:

[PATCH] D32439: Fix for incorrect source position of dependent c'tor initializer (bug:26195)

2017-05-17 Thread Serge Preis via Phabricator via cfe-commits
Serge_Preis added a comment. Hello Richard, This is just friendly ping. Would you please review my fix for source position issue in CXXCtorInitializer and related structures or nominate someone as appropriate reviewer for this code. Thank you, Serge. https://reviews.llvm.org/D32439

[clang-tools-extra] r303242 - Revert "[include-fixer] Don't throw exception when parsing unknown arguments in vim script."

2017-05-17 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed May 17 04:24:28 2017 New Revision: 303242 URL: http://llvm.org/viewvc/llvm-project?rev=303242=rev Log: Revert "[include-fixer] Don't throw exception when parsing unknown arguments in vim script." This reverts commit r302934. It's wrong, edits the wrong file and was

[PATCH] D32524: [clang-format] Fix MatchingOpeningBlockLineIndex computation

2017-05-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. I can't think of a test case either. Thanks! https://reviews.llvm.org/D32524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r303246 - [Lexer] Ensure that the token is not an annotation token when

2017-05-17 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed May 17 06:08:36 2017 New Revision: 303246 URL: http://llvm.org/viewvc/llvm-project?rev=303246=rev Log: [Lexer] Ensure that the token is not an annotation token when retrieving the identifer info for an Objective-C keyword This commit fixes an assertion that's triggered

[PATCH] D32700: [clang-tidy] Add misc-suspicious-memset-usage check.

2017-05-17 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. > The existing google-runtime-memset-zero-length check is related. It finds > cases when the byte count parameter is zero and offers to swap that with the > fill value argument. Perhaps the two could be merged while maintaining > backward compatibility through an alias.

[PATCH] D33272: Method loadFromCommandLine should be able to report errors

2017-05-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. Now FixedCompilationDatabase::loadFromCommandLine has no means to report which error occurred if it fails to create compilation object. This is a block for implementing https://reviews.llvm.org/D33013, because after that change driver refuses to create

[PATCH] D33013: Driver must return non-zero code on errors in command line

2017-05-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: lib/Tooling/CompilationDatabase.cpp:208 IntrusiveRefCntPtr DiagOpts = new DiagnosticOptions(); - UnusedInputDiagConsumer DiagClient; + TextDiagnosticPrinter DiagnosticPrinter(llvm::errs(), &*DiagOpts); + UnusedInputDiagConsumer

[PATCH] D33013: Driver must return non-zero code on errors in command line

2017-05-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 99273. sepavloff added a comment. Moved tooling related code into separate change https://reviews.llvm.org/D33272 https://reviews.llvm.org/D33013 Files: include/clang/Tooling/CompilationDatabase.h lib/Driver/Driver.cpp

r303250 - Constify.

2017-05-17 Thread Vassil Vassilev via cfe-commits
Author: vvassilev Date: Wed May 17 07:09:11 2017 New Revision: 303250 URL: http://llvm.org/viewvc/llvm-project?rev=303250=rev Log: Constify. Modified: cfe/trunk/include/clang/Basic/SourceManager.h Modified: cfe/trunk/include/clang/Basic/SourceManager.h URL:

[PATCH] D33170: [X86] Adding avx512_vpopcntdq feature set and its intrinsics

2017-05-17 Thread Oren Ben Simhon via Phabricator via cfe-commits
oren_ben_simhon added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:7526 +llvm::Type *ResultType = ConvertType(E->getType()); +Value *X = EmitScalarExpr(E->getArg(0)); +llvm::Function *F = CGM.getIntrinsic(Intrinsic::ctpop, ResultType);

[PATCH] D33170: [X86] Adding avx512_vpopcntdq feature set and its intrinsics

2017-05-17 Thread Oren Ben Simhon via Phabricator via cfe-commits
oren_ben_simhon updated this revision to Diff 99276. oren_ben_simhon marked an inline comment as done. oren_ben_simhon added a comment. Implemented comments posted until 05/16 (Thanks Craig) Repository: rL LLVM https://reviews.llvm.org/D33170 Files: include/clang/Basic/BuiltinsX86.def

[PATCH] D32477: [clang-format] Allow customizing the penalty for breaking assignment

2017-05-17 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Basically looks good, but please add a test case where the penalty is high show that it changes behavior. https://reviews.llvm.org/D32477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33273: Recommit "[include-fixer] Don't throw exception when parsing unknown ar… …guments in vim script."

2017-05-17 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. looks good, thanks! https://reviews.llvm.org/D33273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-05-17 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. The current behavior here is actually intended. If you'd like the other format, we probably need to add a style option. What style guide are you basing this on? Comment at: unittests/Format/FormatTest.cpp:2476 "bool value =

[PATCH] D33275: Keep into account if files were virtual.

2017-05-17 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. In some cases we do not have files on disk. They are only available in the FileManager as virtual files and the SourceManager overrides their content. https://reviews.llvm.org/D33275 Files: lib/Basic/SourceManager.cpp

[PATCH] D32479: [clang-format] Add BreakConstructorInitializersBeforeColon option

2017-05-17 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Yes, turning that option into an enum seems like the better choice here. https://reviews.llvm.org/D32479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r303256 - [clang-tidy] A bit of refactoring of modernize-replace-auto-ptr. NFC

2017-05-17 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed May 17 07:57:06 2017 New Revision: 303256 URL: http://llvm.org/viewvc/llvm-project?rev=303256=rev Log: [clang-tidy] A bit of refactoring of modernize-replace-auto-ptr. NFC Modified: clang-tools-extra/trunk/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp Modified:

[PATCH] D33029: [clang-format] add option for dangling parenthesis

2017-05-17 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: include/clang/Format/Format.h:793 + /// \endcode + bool DanglingParenthesis; + stringham wrote: > djasper wrote: > > I don't think this is a name that anyone will intuitively understand. I > > understand that the

[PATCH] D33273: Recommit "[include-fixer] Don't throw exception when parsing unknown ar… …guments in vim script."

2017-05-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. To make it work in neovim. https://reviews.llvm.org/D33273 Files: include-fixer/tool/clang-include-fixer.py Index: include-fixer/tool/clang-include-fixer.py === ---

[PATCH] D33238: [clang-format] Make NoLineBreakFormatter respect MustBreakBefore

2017-05-17 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Are there cases where this makes a difference? If so, add a test. If not, add something to the patch description to clarify. Comment at:

[PATCH] D32480: [clang-format] Add BinPackNamespaces option

2017-05-17 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: include/clang/Format/Format.h:153 + /// \endcode + bool AllowSemicolonAfterNamespace; + While I am not entirely opposed to this feature, I think it should be a separate patch. Comment at:

[PATCH] D32525: [clang-format] Add SpaceBeforeColon option

2017-05-17 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. I have looked through the PDF you linked to, but I couldn't really find much about formatting. I have found one instance of a constructor initializer list, but there is no accompanying text saying that this is even intentional. Haven't found a range-based for loop. As

[PATCH] D33053: [PowerPC] Implement vec_xxpermdi builtin.

2017-05-17 Thread Tony Jiang via Phabricator via cfe-commits
jtony updated this revision to Diff 99292. jtony added a comment. Address all the comments from Nemanja. https://reviews.llvm.org/D33053 Files: include/clang/Basic/BuiltinsPPC.def include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/CodeGen/CGBuiltin.cpp

[PATCH] D33277: [Clang][x86][Inline Asm] - Enum support for MS syntax

2017-05-17 Thread Matan via Phabricator via cfe-commits
mharoush created this revision. mharoush added a project: clang-c. Herald added a subscriber: eraman. This patch enables the usage of constant Enum identifiers within Microsoft style inline assembly statements. part 1 out of 2. Repository: rL LLVM https://reviews.llvm.org/D33277 Files:

[PATCH] D33273: Recommit "[include-fixer] Don't throw exception when parsing unknown ar… …guments in vim script."

2017-05-17 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303260: Recommit "[include-fixer] Don't throw exception when parsing unknown ar…… (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D33273?vs=99275=99298#toc Repository: rL

[PATCH] D33278: [LLVM][x86][Inline Asm] - Enum support for MS syntax

2017-05-17 Thread Matan via Phabricator via cfe-commits
mharoush created this revision. This patch enables the usage of constant Enum identifiers within Microsoft style inline assembly statements. part 2 out of 2. [https://reviews.llvm.org/D33277] Repository: rL LLVM https://reviews.llvm.org/D33278 Files:

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-05-17 Thread wangrunan via Phabricator via cfe-commits
iris added a comment. In https://reviews.llvm.org/D28952#751431, @ddcc wrote: > In https://reviews.llvm.org/D28952#750558, @iris wrote: > > > How can I make z3constraintmanager.cpp work in the command line?Or how to > > make z3 work? > > > You'll need a bleeding-edge build of Clang/LLVM, since

[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-05-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 99300. NoQ added a comment. Herald added a subscriber: xazax.hun. Automatically pop up from bodyfarm-originated code in `PathDiagnosticLocation::getStmt()`. Avoid putting "Calling..." and "Returning..." notes on Objective-C auto-synthesized property calls,

[clang-tools-extra] r303263 - [clang-tidy] Replace matchesName with hasName where no regex is needed

2017-05-17 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed May 17 09:39:39 2017 New Revision: 303263 URL: http://llvm.org/viewvc/llvm-project?rev=303263=rev Log: [clang-tidy] Replace matchesName with hasName where no regex is needed Modified: clang-tools-extra/trunk/clang-tidy/modernize/MakeSharedCheck.cpp

[PATCH] D33191: [analyzer] ObjCGenerics: account for __kindof specifiers met along a chain of casts.

2017-05-17 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D33191#756174, @NoQ wrote: > @Gábor: I didn't want to bother you with this, but i'm not entirely sure > about how to deal with these false positives; since you're the original > author of this check, if you see anything obviously wrong

[clang-tools-extra] r303264 - Change getChecksFilter() interface to hide implementation details.

2017-05-17 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed May 17 09:39:47 2017 New Revision: 303264 URL: http://llvm.org/viewvc/llvm-project?rev=303264=rev Log: Change getChecksFilter() interface to hide implementation details. Modified: clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp