[PATCH] D34546: docs: Add documentation for the ThinLTO cache pruning policy string.

2017-06-22 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added inline comments. Comment at: clang/docs/ThinLTO.rst:160 + value of 0 forces the scan to occur. The default is every 20 minutes. + Clang Bootstrap pcc wrote: > mehdi_amini wrote: > > Why do we document linker-specific option in clang docs? Is

[PATCH] D34546: docs: Add documentation for the ThinLTO cache pruning policy string.

2017-06-22 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/docs/ThinLTO.rst:160 + value of 0 forces the scan to occur. The default is every 20 minutes. + Clang Bootstrap mehdi_amini wrote: > Why do we document linker-specific option in clang docs? Is it usual? It does seem

[libcxx] r306083 - Implement inclusive_scan/transform_inclusive_scan for C++17.

2017-06-22 Thread Marshall Clow via cfe-commits
Author: marshall Date: Fri Jun 23 00:12:42 2017 New Revision: 306083 URL: http://llvm.org/viewvc/llvm-project?rev=306083=rev Log: Implement inclusive_scan/transform_inclusive_scan for C++17. Added: libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/

[PATCH] D34546: docs: Add documentation for the ThinLTO cache pruning policy string.

2017-06-22 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added inline comments. Comment at: clang/docs/ThinLTO.rst:160 + value of 0 forces the scan to occur. The default is every 20 minutes. + Clang Bootstrap Why do we document linker-specific option in clang docs? Is it usual?

[PATCH] D33842: [AMDGPU] Fix address space of global variable

2017-06-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Basic/TargetInfo.h:969 + /// LangAS::Default. + virtual unsigned getGlobalAddressSpace() const { return LangAS::Default; } + I'm not sure this really needs to exist. Comment at:

r306079 - [Frontend] 'Show hotness' can be used with a sampling profile

2017-06-22 Thread Brian Gesiak via cfe-commits
Author: modocache Date: Thu Jun 22 21:38:45 2017 New Revision: 306079 URL: http://llvm.org/viewvc/llvm-project?rev=306079=rev Log: [Frontend] 'Show hotness' can be used with a sampling profile Summary: Prior to this change, using `-fdiagnostics-show-hotness` with a sampling profile specified via

[PATCH] D34546: docs: Add documentation for the ThinLTO cache pruning policy string.

2017-06-22 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. Herald added subscribers: eraman, inglorion. https://reviews.llvm.org/D34546 Files: clang/docs/ThinLTO.rst Index: clang/docs/ThinLTO.rst === --- clang/docs/ThinLTO.rst +++ clang/docs/ThinLTO.rst @@

r306077 - Add missing file from r306075.

2017-06-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jun 22 20:18:27 2017 New Revision: 306077 URL: http://llvm.org/viewvc/llvm-project?rev=306077=rev Log: Add missing file from r306075. Added: cfe/trunk/test/Misc/Inputs/module.modulemap Added: cfe/trunk/test/Misc/Inputs/module.modulemap URL:

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

2017-06-22 Thread Richard Smith via cfe-commits
On 22 June 2017 at 16:18, Michael Gottesman wrote: > > On Jun 21, 2017, at 4:56 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > On 21 June 2017 at 16:55, Bruno Cardoso Lopes > wrote: > >> On Wed, Jun 21, 2017 at 4:44

r306075 - PR33552: Distinguish between declarations that are owned by no module and

2017-06-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jun 22 20:04:34 2017 New Revision: 306075 URL: http://llvm.org/viewvc/llvm-project?rev=306075=rev Log: PR33552: Distinguish between declarations that are owned by no module and declarations that are owned but unconditionally visible. This allows us to set declarations as

[PATCH] D33606: [Sema] Fix a crash-on-invalid when a template parameter list has a class definition or non-reference class type

2017-06-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D33606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33565: [WebAssembly] Add default -allow-undefined-file to linker args

2017-06-22 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL306074: [WebAssembly] Add default -allow-undefined-file to linker args (authored by sbc). Changed prior to commit: https://reviews.llvm.org/D33565?vs=103130=103668#toc Repository: rL LLVM

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

2017-06-22 Thread Michael Gottesman via cfe-commits
> On Jun 21, 2017, at 4:56 PM, Richard Smith via cfe-commits > wrote: > > On 21 June 2017 at 16:55, Bruno Cardoso Lopes > wrote: > On Wed, Jun 21, 2017 at 4:44 PM, Richard Smith

r306065 - PR33002: When we instantiate the definition of a static data member, we might

2017-06-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jun 22 17:18:46 2017 New Revision: 306065 URL: http://llvm.org/viewvc/llvm-project?rev=306065=rev Log: PR33002: When we instantiate the definition of a static data member, we might have attached an initializer to the in-class declaration. If so, include the initializer in

[PATCH] D34523: AST: mangle BlockDecls under MS ABI

2017-06-22 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > @efriedma hmm...using getBlockManglingNumber causes the name to be > duplicated. Ill look into that. Have you looked at the Itanium mangling implementation? > However, wouldn't all the block invocation functions be defined and COMDAT'ed? IIRC, we always emit blocks

[PATCH] D34082: [Frontend] 'Show hotness' can be used with a sampling profile

2017-06-22 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 103647. modocache added a comment. Update the sampling profile text so that it produces the hotness expected by the test. This is ready to go :) https://reviews.llvm.org/D34082 Files: lib/Frontend/CompilerInvocation.cpp

[PATCH] D34536: [libcxx] [test] Fix Clang -Wunused-local-typedef warnings.

2017-06-22 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT created this revision. [libcxx] [test] Fix Clang -Wunused-local-typedef warnings. https://reviews.llvm.org/D34536 Files: test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp

[PATCH] D34535: [libcxx] [test] Fix MSVC warning C4067 "unexpected tokens following preprocessor directive - expected a newline".

2017-06-22 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT created this revision. [libcxx] [test] Fix MSVC warning C4067 "unexpected tokens following preprocessor directive - expected a newline". Also fixes Clang/LLVM 4.0 (for Windows) error "function-like macro 'TEST_GLIBC_PREREQ' is not defined". https://reviews.llvm.org/D34535 Files:

[PATCH] D34534: [libcxx] [test] Fix MSVC warning C4242 "conversion from 'int' to 'const char', possible loss of data".

2017-06-22 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT created this revision. [libcxx] [test] Fix MSVC warning C4242 "conversion from 'int' to 'const char', possible loss of data". https://reviews.llvm.org/D34534 Files: test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp

[PATCH] D34114: [clang] A better format for unnecessary packed warning.

2017-06-22 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. Richard, can you take a look at this, or suggest someone who would be a good reviewer for this improved diagnostic? Thanks. Repository: rL LLVM https://reviews.llvm.org/D34114 ___ cfe-commits mailing list

[PATCH] D34299: [ubsan] Improve diagnostics for return value checks (clang)

2017-06-22 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: lib/CodeGen/CGStmt.cpp:1035 +assert(ReturnLocation.isValid() && "No valid return location"); +Builder.CreateStore(Builder.CreateBitCast(SLocPtr, Int8PtrTy), +ReturnLocation); filcab wrote: >

[PATCH] D34299: [ubsan] Improve diagnostics for return value checks (clang)

2017-06-22 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 103632. vsk marked an inline comment as done. vsk added a comment. Handle functions without return statements correctly (fixing an issue pointed out by @arphaman). Now, the instrumentation always checks that we have a valid return location before calling the

[PATCH] D34523: AST: mangle BlockDecls under MS ABI

2017-06-22 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @efriedma hmm...using `getBlockManglingNumber` causes the name to be duplicated. Ill look into that. However, wouldn't all the block invocation functions be defined and COMDAT'ed? @majnemer Sure, will add more tests. Repository: rL LLVM

[PATCH] D34299: [ubsan] Improve diagnostics for return value checks (clang)

2017-06-22 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D34299#788379, @filcab wrote: > In https://reviews.llvm.org/D34299#788152, @vsk wrote: > > > The source locations aren't constants. The ubsan runtime uses a bit inside > > of source location structures as a flag. When an issue is diagnosed at a

[PATCH] D34299: [ubsan] Improve diagnostics for return value checks (clang)

2017-06-22 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. In https://reviews.llvm.org/D34299#788152, @vsk wrote: > The source locations aren't constants. The ubsan runtime uses a bit inside of > source location structures as a flag. When an issue is diagnosed at a > particular source location, that bit is atomically set. This

Re: r297702 - [CodeGen][ObjC] Fix a bug where the type of an ivar wasn't encoded

2017-06-22 Thread Akira Hatanaka via cfe-commits
According to the documentation, the starting position of the field has to be encoded too: https://gcc.gnu.org/onlinedocs/gcc/Type-encoding.html I’m not sure whether we need the same information for bitfield ivars though. > On Jun 22,

[PATCH] D34529: [Driver] Check that the iOS deployment target is iOS 10 or earlier if the target is 32-bit

2017-06-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. The following changes are made to the driver since 32-bit apps do not run on iOS 11 or later: - If the deployment target is set explicitly, either with a command-line option or an environment variable, the driver should report an error if the version is greater

[PATCH] D34449: [clang-tidy] Enable constexpr definitions in headers.

2017-06-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Have thought this a bit more, I misunderstood your patch previously (sorry for that). I think what you intend to do is to ignore C++17 `inline variables` in headers, am I correct? Comment at: test/clang-tidy/misc-definitions-in-headers.hpp:1 -// RUN:

[PATCH] D34526: [clang-tidy] Fix modernize-use-nullptr only warns the first NULL argument.

2017-06-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added a subscriber: xazax.hun. https://reviews.llvm.org/D34526 Files: clang-tidy/modernize/UseNullptrCheck.cpp test/clang-tidy/modernize-use-nullptr.cpp Index: test/clang-tidy/modernize-use-nullptr.cpp

[PATCH] D34523: AST: mangle BlockDecls under MS ABI

2017-06-22 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Patch is missing context. You have to use getBlockManglingNumber() for blocks which are externally visible; otherwise, the numbers won't be consistent in other translation units. Repository: rL LLVM https://reviews.llvm.org/D34523

[PATCH] D34523: AST: mangle BlockDecls under MS ABI

2017-06-22 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. Can you please have a test where you define blocks w/ static variables in several default arguments of the same function? Also would be good to have this in NSDMIs in class definitions. Repository: rL LLVM https://reviews.llvm.org/D34523

Re: r297702 - [CodeGen][ObjC] Fix a bug where the type of an ivar wasn't encoded

2017-06-22 Thread Joerg Sonnenberger via cfe-commits
On Thu, Jun 22, 2017 at 11:09:48AM -0700, Akira Hatanaka wrote: > Do you want the same encoding for the bitfield “int : 1” you saw before > r297792, which is just “i"? > > The encoding for bitfield is normally bN where N is the number of bits, > but the comment in function EncodeBitField says

[PATCH] D33842: [AMDGPU] Fix address space of global variable

2017-06-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 103613. yaxunl marked 2 inline comments as done. yaxunl added a comment. Revised by John's comments. https://reviews.llvm.org/D33842 Files: include/clang/Basic/TargetInfo.h lib/Basic/Targets.cpp lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGDecl.cpp

[PATCH] D34523: AST: mangle BlockDecls under MS ABI

2017-06-22 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a project: clang. When generating the decorated name for a static variable inside a BlockDecl, construct a scope for the block invocation function that homes the parameter. This allows for arbitrary nesting of the blocks even if the variables are

[PATCH] D34121: [ubsan] Teach the pointer overflow check that "p - <= p" (PR33430)

2017-06-22 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 103606. vsk added a comment. Fix a typo introduced in emitArraySubscriptGEP while refactoring /*isSubtraction=false*/ to CodeGenFunction::NotSubtraction, and add CHECK lines which catch the issue. https://reviews.llvm.org/D34121 Files:

[PATCH] D34299: [ubsan] Improve diagnostics for return value checks (clang)

2017-06-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D34299#788152, @vsk wrote: > In https://reviews.llvm.org/D34299#787795, @arphaman wrote: > > > It looks like if we have a function without the `return` (like the sample > > below), we will pass in a `0` as the location pointer. This will

Re: r297702 - [CodeGen][ObjC] Fix a bug where the type of an ivar wasn't encoded

2017-06-22 Thread Akira Hatanaka via cfe-commits
Do you want the same encoding for the bitfield “int : 1” you saw before r297792, which is just “i"? The encoding for bitfield is normally bN where N is the number of bits, but the comment in function EncodeBitField says GNU runtime encodes it differently. > On Jun 22, 2017, at 8:30 AM, Joerg

[PATCH] D34299: [ubsan] Improve diagnostics for return value checks (clang)

2017-06-22 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D34299#787795, @arphaman wrote: > It looks like if we have a function without the `return` (like the sample > below), we will pass in a `0` as the location pointer. This will prevent a > report of a runtime error as your compiler-rt change

[PATCH] D34469: Use vfs::FileSystem in ASTUnit when creating CompilerInvocation.

2017-06-22 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a reviewer: bruno. bruno added a comment. Any reason why this doesn't contain a testcase? https://reviews.llvm.org/D34469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34102: [analyzer] Add portability package for the checkers.

2017-06-22 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. This just supports the statement that this particular check should not go under unix. I understand that it will be inconsistent with the name of the malloc checker, which we probably should not change as people might be relying on the package names. I think it's

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-22 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL306033: [Sema] Add -Wunguarded-availability-new (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D34264?vs=103577=103598#toc Repository: rL LLVM

r306033 - [Sema] Add -Wunguarded-availability-new

2017-06-22 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Thu Jun 22 12:02:24 2017 New Revision: 306033 URL: http://llvm.org/viewvc/llvm-project?rev=306033=rev Log: [Sema] Add -Wunguarded-availability-new The new compiler warning -Wunguarded-availability-new is a subset of -Wunguarded-availability. It is on by default. It only

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

2017-06-22 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki marked 4 inline comments as done. danielmarjamaki added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp:126 + << BinaryOperator::getOpcodeStr(B->getOpcode()) + << "' expression is undefined due to shift count >=

[PATCH] D30326: [MS-ABI] Allow #pragma section to choose for ZI data

2017-06-22 Thread Javed Absar via Phabricator via cfe-commits
javed.absar abandoned this revision. javed.absar added a comment. Abandoning as there is a separate pragma clang section implementation now. https://reviews.llvm.org/D30326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33499: [PPC] PPC32/Darwin ABI info

2017-06-22 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz added a comment. Great! Thanks. Repository: rL LLVM https://reviews.llvm.org/D33499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-06-22 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki updated this revision to Diff 103585. danielmarjamaki added a comment. Fix review comments Repository: rL LLVM https://reviews.llvm.org/D30295 Files: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h lib/StaticAnalyzer/Checkers/ConversionChecker.cpp

[PATCH] D34304: Allow CompilerInvocations to generate .d files.

2017-06-22 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine added a comment. In https://reviews.llvm.org/D34304#787699, @klimek wrote: > I mean, arguments need to be adjusted before converting to ArgStringList and > calling newInvocation? I'm not sure I fully understand the problem, can you > elaborate? This gets back to why the original

Re: r297702 - [CodeGen][ObjC] Fix a bug where the type of an ivar wasn't encoded

2017-06-22 Thread Joerg Sonnenberger via cfe-commits
On Mon, Jun 12, 2017 at 09:03:10PM +0200, Joerg Sonnenberger wrote: > On Thu, Jun 01, 2017 at 05:58:41PM -0700, Akira Hatanaka wrote: > > It crashes when there is an anonymous ivar of a bitfield type. > > > > @interface FormatScanner { > > int : 1; > > } > > @end > > > > @implementation

[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks

2017-06-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D32642#787913, @baloghadamsoftware wrote: > I tried `SValBuilder::evalBinOp()` first but it did not help too much. It > could decide only if I compared the same conjured symbols or different ones, > but nothing more. It always gave me

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM, thanks for working on this! Repository: rL LLVM https://reviews.llvm.org/D34264 ___ cfe-commits mailing list

[PATCH] D34513: [NFC] Update to account for DiagnosticRenderer use of FullSourceLoc

2017-06-22 Thread Christof Douma via Phabricator via cfe-commits
christof added a reviewer: alexfh. christof added a comment. Added Alexander as he seems to have touched clang-tidy recently. https://reviews.llvm.org/D34513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34513: [NFC] Update to account for DiagnosticRenderer use of FullSourceLoc

2017-06-22 Thread Christof Douma via Phabricator via cfe-commits
christof added a comment. This looks good to me. But since I have never touch this code, I'll wait a bit till accepting this for others to have a say. https://reviews.llvm.org/D34513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 103577. arphaman added a comment. Update the logic for `-Wunguarded-availability -Wno-unguarded-availability-new` so that it only warns for the old APIs. Repository: rL LLVM https://reviews.llvm.org/D34264 Files:

[PATCH] D34514: [mips] Enable IAS by default for Android 64-bit MIPS target (N64)

2017-06-22 Thread Petar Jovanovic via Phabricator via cfe-commits
petarj created this revision. Herald added subscribers: arichardson, srhines. IAS is already used for MIPS64 in majority of Android projects. Android MIPS64 uses N64 ABI. Set IAS as a default now. Repository: rL LLVM https://reviews.llvm.org/D34514 Files: lib/Driver/ToolChains/Gnu.cpp

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-06-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Regarding serializing vs not serializing and now vs later. 1. I think we eventually need to provide a reasonable default approach presented to the user. This approach shouldn't be hurting the user dramatically in any sense. Because //serializing// hurts the user's disk

[PATCH] D34506: Relax an assert in the comparison of source locations

2017-06-22 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. I don't think it is a good idea to make this function non-transitive. Repository: rL LLVM https://reviews.llvm.org/D34506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-06-22 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. General direction looks good. I think in addition to integration tests through the static analyzer, we should still have unit tests. Comment at: include/clang/Tooling/CrossTranslationUnit.h:47 + + const FunctionDecl *getCTUDefinition(const

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Some of the CTU related analyzer independent parts are being factored out. The review is ongoing here: https://reviews.llvm.org/D34512 Another small and independent part is under review here: https://reviews.llvm.org/D34506 https://reviews.llvm.org/D30691

[PATCH] D34513: [NFC] Update to account for DiagnosticRenderer use of FullSourceLoc

2017-06-22 Thread Peter Smith via Phabricator via cfe-commits
peter.smith created this revision. https://reviews.llvm.org/D31709 [NFC] Refactor DiagnosticRenderer to use FullSourceLoc was committed in r305684 and reverted in 305688 as clang-tidy and clang-query failed to build. This change updates the extra tools to use the new interface. With this

[PATCH] D34059: Get the file name for the symbol from the Module, not the SourceManager.

2017-06-22 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 103572. v.g.vassilev added a comment. Update test file comment. https://reviews.llvm.org/D34059 Files: lib/CodeGen/CGDeclCXX.cpp unittests/CodeGen/CMakeLists.txt unittests/CodeGen/IncrementalProcessingTest.cpp Index:

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 103571. xazax.hun added a comment. - Add a tool to dump USRs for function definitions. It can be used to create index files. https://reviews.llvm.org/D34512 Files: include/clang/Tooling/CrossTranslationUnit.h lib/Tooling/CMakeLists.txt

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. Herald added a subscriber: mgorny. This patch introduces a class that can help to build tools that require cross translation unit facilities. This class allows function definitions to be loaded from external AST files based on an index. In order to use this

[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks

2017-06-22 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 103568. baloghadamsoftware added a comment. Minor fixes according to the comments. https://reviews.llvm.org/D32642 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Analysis/Inputs/system-header-simulator-cxx.h

[PATCH] D34059: Get the file name for the symbol from the Module, not the SourceManager.

2017-06-22 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 103566. v.g.vassilev added a comment. Herald added a subscriber: mgorny. Add a test case. https://reviews.llvm.org/D34059 Files: lib/CodeGen/CGDeclCXX.cpp unittests/CodeGen/CMakeLists.txt unittests/CodeGen/IncrementalProcessingTest.cpp Index:

[PATCH] D34444: Teach codegen to work in incremental processing mode.

2017-06-22 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 103565. v.g.vassilev added a comment. Bring back the initial state of this patch. I accidentally uploaded a wrong patch here, instead of its dependee... https://reviews.llvm.org/D3 Files: include/clang/CodeGen/ModuleBuilder.h

[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks

2017-06-22 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. I tried `SValBuilder::evalBinOp()` first but it did not help too much. It could decide only if I compared the same conjured symbols or different ones, but nothing more. It always gave me `UnknownVal`. Even if comparing ${conj_X} == ${conj_X} + n where n was

[PATCH] D34510: Teach clang how to merge typedef over anonymous structs in C mode.

2017-06-22 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. empty.h makes module A available. textual.h brings the definition of __fsid_t and a.h imports again the definition of __fsid_t. In C mode clang fails to merge the textually included definition with the one imported from a module. The C lookup rules fail to

[PATCH] D34299: [ubsan] Improve diagnostics for return value checks (clang)

2017-06-22 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Splitting the attrloc from the useloc might make sense since we would be able to emit attrloc just once. But I don't see why we need to store/load those pointers in runtime instead of just caching the `Constant*` in `CodeGenFunction`. I'd also like to have some asserts

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-22 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. Aside from a few small nits with the test cases, this LGTM! You should hold off on committing for a day or two in case Richard or others have comments on the patch.

[PATCH] D34444: Teach codegen to work in incremental processing mode.

2017-06-22 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 103560. v.g.vassilev added a comment. Herald added a subscriber: mgorny. Add a test. Patch by Axel Naumann! https://reviews.llvm.org/D3 Files: lib/CodeGen/CGDeclCXX.cpp unittests/CodeGen/CMakeLists.txt

[PATCH] D34506: Relax an assert in the comparison of source locations

2017-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Note that, it is not easy to add a test case for this patch without the https://reviews.llvm.org/D30691 being accepted. Repository: rL LLVM https://reviews.llvm.org/D34506 ___ cfe-commits mailing list

[PATCH] D33841: [clang-tidy] redundant keyword check

2017-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: docs/clang-tidy/checks/readability-redundant-keyword.rst:8 + +`extern` is redundant in function declarations + alexfh wrote: > Could you explain, why you think `extern` is redundant in function > declarations? Just

[PATCH] D34462: [index] "SpecializationOf" relation should be added even to forward declarations of class template specializations

2017-06-22 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305996: [index] Add the "SpecializationOf" relation to the forward declarations (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D34462?vs=103411=103554#toc Repository: rL

r305996 - [index] Add the "SpecializationOf" relation to the forward declarations

2017-06-22 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Thu Jun 22 06:20:07 2017 New Revision: 305996 URL: http://llvm.org/viewvc/llvm-project?rev=305996=rev Log: [index] Add the "SpecializationOf" relation to the forward declarations of class template specializations This commit fixes an issue where a forward declaration of a

[PATCH] D34506: Relax an assert in the comparison of source locations

2017-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. Right now source locations from different translation units can not be compared. This is a problem for an upcoming feature in the Static Analyzer, the cross translation unit support (https://reviews.llvm.org/D30691). It would be great to be able to sort the

[PATCH] D34299: [ubsan] Improve diagnostics for return value checks (clang)

2017-06-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. It looks like if we have a function without the `return` (like the sample below), we will pass in a `0` as the location pointer. This will prevent a report of a runtime error as your compiler-rt change ignores the location pointers that are `nil`. Is this a bug or is

[PATCH] D34502: [analyzer] Do not continue to analyze a path if the constraints contradict with builtin assume

2017-06-22 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305991: [analyzer] Do not continue to analyze a path if the constraints contradict with… (authored by xazax). Changed prior to commit: https://reviews.llvm.org/D34502?vs=103540=103544#toc Repository:

r305991 - [analyzer] Do not continue to analyze a path if the constraints contradict with builtin assume

2017-06-22 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Thu Jun 22 05:09:40 2017 New Revision: 305991 URL: http://llvm.org/viewvc/llvm-project?rev=305991=rev Log: [analyzer] Do not continue to analyze a path if the constraints contradict with builtin assume Differential Revision: https://reviews.llvm.org/D34502 Removed:

[PATCH] D34502: [analyzer] Do not continue to analyze a path if the constraints contradict with builtin assume

2017-06-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Hmm, yeah, right :) Repository: rL LLVM https://reviews.llvm.org/D34502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34502: [analyzer] Do not continue to analyze a path if the constraints contradict with builtin assume

2017-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. Herald added a subscriber: whisperity. This is how asserts are working right now. This way the semantics of __builtin_assume will be identical to asserts. I also moved the tests to another file. Repository: rL LLVM https://reviews.llvm.org/D34502 Files:

[PATCH] D33499: [PPC] PPC32/Darwin ABI info

2017-06-22 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. This seems like a reasonable start, and is a step forward. For the VAArgs, this will be self-consistent, but to be compliant with the system ABI, I think you'll need to account the different padding rules for small aggregates, as per pp14 of "Mac_OS_X_ABI_Function_Calls".

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-22 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: include/clang/Tooling/ASTDiff/ASTDiff.h:57 +/// Within a tree, this identifies a node by its preorder offset. +using NodeId = int; + johannes wrote: > arphaman wrote: > > I think that it's better to make make `NodeId` a

[PATCH] D34469: Use vfs::FileSystem in ASTUnit when creating CompilerInvocation.

2017-06-22 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D34469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34470: [clangd] Allow to override resource dir in ClangdServer.

2017-06-22 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D34470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34304: Allow CompilerInvocations to generate .d files.

2017-06-22 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. I mean, arguments need to be adjusted before converting to ArgStringList and calling newInvocation? I'm not sure I fully understand the problem, can you elaborate? https://reviews.llvm.org/D34304 ___ cfe-commits mailing

[PATCH] D34496: [clang] Fix printf check for CFIndex

2017-06-22 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 103536. alexshap added a comment. update the tests Repository: rL LLVM https://reviews.llvm.org/D34496 Files: lib/Sema/SemaChecking.cpp test/FixIt/fixit-format-darwin.m test/FixIt/format-darwin.m Index: test/FixIt/format-darwin.m

[PATCH] D34496: [clang] Fix printf check for CFIndex

2017-06-22 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap planned changes to this revision. alexshap added a comment. ignore this diff for now, i will update it soon. Repository: rL LLVM https://reviews.llvm.org/D34496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH v3] [PPC64]: Add support for Swift calling convention

2017-06-22 Thread Andrew Jeffery via cfe-commits
For the tests I've extracted the int5 and int8 cases to cater for different alignments for different platform ABIs. For Linux on POWER the 5 and 8 element vectors must be naturally aligned with respect to the total "soft" vector size, despite being represented as an aggregate. Specifically, the

[PATCH] D34198: Fix __has_trivial_destructor crash when the type is incomplete with unknown array bounds.

2017-06-22 Thread Puneetha K via Phabricator via cfe-commits
puneetha updated this revision to Diff 103530. puneetha added a comment. Added test cases for all the affecting traits. https://reviews.llvm.org/D34198 Files: lib/Sema/SemaExprCXX.cpp test/SemaCXX/type-traits.cpp Index: test/SemaCXX/type-traits.cpp

[PATCH] D34439: Add GCC's noexcept-type alias for c++1z-compat-mangling

2017-06-22 Thread Axel Naumann via Phabricator via cfe-commits
karies added a comment. For the record, here's what GCC does (from https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html#C_002b_002b-Dialect-Options which probably has a typo, the second -Wnoexcept is likely meant to be -Wnoexcept-type): "Enabled by -Wabi and -Wc++1z-compat."