[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-20 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 103163. johannes added a comment. - Add the option to not use compilation databases. - Add a basic test. https://reviews.llvm.org/D34329 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp lib/Tooling/ASTDiff/CMakeLists.txt

[PATCH] D34266: Static Analyzer - Localizability Checker: New Localizable APIs for macOS High Sierra & iOS 11

2017-06-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hmm, should there be new tests that demonstrate that we cover the new APIs? Repository: rL LLVM https://reviews.llvm.org/D34266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-20 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: include/clang/Tooling/ASTDiff/ASTDiff.h:123 + +void runDiff(ASTContext &AST1, ASTContext &AST2); + This is the main exposed interface? Generally, if all we want to do is printing, I wouldn't put that into a library in T

[PATCH] D34277: [analyzer] Bump default performance thresholds?

2017-06-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Gabor makes such a good point. Maybe we should commit the zombie symbols patch as well (: https://reviews.llvm.org/D34277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

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

2017-06-20 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D34304#784496, @saugustine wrote: > In https://reviews.llvm.org/D34304#783675, @klimek wrote: > > > I think a better way might be to generally leave dependency options alone, > > add a default argument adapter to filter out all deps related fla

[PATCH] D34263: [preprocessor] When preprocessor option 'SingleFileParseMode' is enabled, parse all directive blocks if the condition uses undefined macros

2017-06-20 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. oh, and lg from my side https://reviews.llvm.org/D34263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D34263: [preprocessor] When preprocessor option 'SingleFileParseMode' is enabled, parse all directive blocks if the condition uses undefined macros

2017-06-20 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D34263#784168, @akyrtzi wrote: > In https://reviews.llvm.org/D34263#783694, @klimek wrote: > > > how many patches for single file mode are coming down the road, though? I'm > > somewhat concerned about the overall complexity it'll add to clang.

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-06-20 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I do not see any test cases for this patch. Could you add them as well? Are you sure that this representation is ok? How do you handle the following case? struct A { A() { X x; x.virtualMethod(); // this virtual call is ok } } int main() {

[PATCH] D34263: [preprocessor] When preprocessor option 'SingleFileParseMode' is enabled, parse all directive blocks if the condition uses undefined macros

2017-06-20 Thread Vladimir Voskresensky via Phabricator via cfe-commits
voskresensky.vladimir added a comment. > Here's an example to clarify the difference: Thanks for the example. You are right, I missed this difference in patch. https://reviews.llvm.org/D34263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-20 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes marked 10 inline comments as done. johannes added inline comments. Comment at: include/clang/Tooling/ASTDiff/ASTDiff.h:123 + +void runDiff(ASTContext &AST1, ASTContext &AST2); + klimek wrote: > This is the main exposed interface? > > Generally, if all w

[PATCH] D34392: [index] Nested class declarations should be annotated with the "specializationOf" relation if they pseudo-override a type in the base template

2017-06-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This fixes an issue where Xcode's renaming engine couldn't find the reference to the second occurrence of "InnerClass" in this example: template struct Ts { template struct InnerClass { }; }; template<> struct Ts { template struct InnerClass; // This occu

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-20 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. Repository: rL LLVM https://reviews.llvm.org/D34268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-06-20 Thread wangxin via Phabricator via cfe-commits
wangxindsb updated this revision to Diff 103180. wangxindsb added a comment. Add test case for the patch https://reviews.llvm.org/D34275 Files: virtualcall.cpp Index: virtualcall.cpp === --- virtualcall.cpp +++ virtualcall.cpp @

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-06-20 Thread wangxin via Phabricator via cfe-commits
wangxindsb added a comment. > I do not see any test cases for this patch. Could you add them as well? I add the test case just now. > How do you handle the following case? > > struct A { > A() { > X x; > x.virtualMethod(); // this virtual call is ok > } > } > int main(

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Looking at the output of the tool, I have the following suggestion: - We should avoid implicit expressions (We don't need to see things like `Insert ImplicitCastExpr(21) into BinaryOperator: *(22) at 0`). This can be done in a follow-up patch though. ===

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-06-20 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Note that when you update the differential revision you need to upload the whole diff. Your diff now only contains the tests but not the code. In https://reviews.llvm.org/D34275#785189, @wangxindsb wrote: > > How do you handle the following case? > > > > struct A {

[PATCH] D34395: clang-format: add options to merge empty record body

2017-06-20 Thread Francois Ferrand via Phabricator via cfe-commits
Typz created this revision. Herald added a subscriber: klimek. This patch introduces a few extra BraceWrapping options, similar to `SplitEmptyFunction`, to allow merging empty 'record' bodies (e.g. class, struct, union and namespace): - SplitEmptyClass - SplitEmptyStruct - SplitEmptyUnion - Split

[PATCH] D33030: [libcxxabi] Align unwindHeader on a double-word boundary

2017-06-20 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. In LibreOffice we unfortunately have some dirty code that synthesizes exception throwing, calling `__cxa_allocate_exception`, `__cxa_throw` (passing in our own exception destructor function), and then, when the exception destructor function gets called, assumes we can map

[PATCH] D34287: Moved code hanlding precompiled preamble out of the ASTUnit.

2017-06-20 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Frontend/ASTUnit.cpp:131-136 +/// \brief Get a source buffer for \p MainFilePath, handling all file-to-file +/// and file-to-buffer remappings inside \p Invocation. +static PossiblyOwnedBuffer +getBufferForFileHandlingRemapping(const

[PATCH] D34399: clang-format: introduce InlineOnly short function style

2017-06-20 Thread Francois Ferrand via Phabricator via cfe-commits
Typz created this revision. Herald added subscribers: rengolin, klimek. This is the same as Inline, except it does not imply all empty functions are merged: with this style, empty functions are merged only if they also match the 'inline' criteria (i.e. defined in a class). This is helpful to avoi

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-06-20 Thread wangxin via Phabricator via cfe-commits
wangxindsb added a comment. > What about: > > struct A { > A() { > X x; > x.virtualMethod(); // this virtual call is ok > foo(); // should warn here > } > virtual foo(); > } > int main() { > A a; > } > > > Does the checker warn on the second call? Yes,

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

2017-06-20 Thread Francois Ferrand via Phabricator via cfe-commits
Typz marked 7 inline comments as done. Typz added a comment. This style is used in the Skia project. https://reviews.llvm.org/D32478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

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

2017-06-20 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 103195. Typz added a comment. Rebase & fix indentation when newline is inserted after return or equal. https://reviews.llvm.org/D32478 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationIndenter.h lib/Format

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-06-20 Thread wangxin via Phabricator via cfe-commits
wangxindsb updated this revision to Diff 103196. wangxindsb added a comment. Add test case for the virtual call checker. https://reviews.llvm.org/D34275 Files: lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp test/Analysis/virtualcall.cpp Index: test/Analysis/virtualcall.cpp

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-06-20 Thread wangxin via Phabricator via cfe-commits
wangxindsb updated this revision to Diff 103199. wangxindsb added a comment. Add run line in the test case. https://reviews.llvm.org/D34275 Files: lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp test/Analysis/virtualcall.cpp Index: test/Analysis/virtualcall.cpp =

[PATCH] D34395: clang-format: add options to merge empty record body

2017-06-20 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 103202. Typz added a comment. Enable merging records for Mozilla style https://reviews.llvm.org/D34395 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/FormatToken.h lib/Format/UnwrappedLineFormatter.cpp unittests/Format/FormatTe

[PATCH] D34287: Moved code hanlding precompiled preamble out of the ASTUnit.

2017-06-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 103203. ilya-biryukov added a comment. Removed PossiblyOwnedBuffer, added an extra copy instead. This makes the code much simpler. https://reviews.llvm.org/D34287 Files: include/clang/Frontend/ASTUnit.h include/clang/Frontend/PrecompiledPreamble.h

[PATCH] D33719: Add _Float16 as a C/C++ source language type

2017-06-20 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer updated this revision to Diff 103201. SjoerdMeijer edited the summary of this revision. SjoerdMeijer added a comment. I have added a fix for mixed __fp16 and _Float16 expressions: _Float16 type is converted to __fp16 type and then the operation is completed as if both operands were

[PATCH] D34235: [OpenCL] Fix OpenCL and SPIR version metadata generation.

2017-06-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! https://reviews.llvm.org/D34235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

r305796 - [OpenCL] Fix OpenCL and SPIR version metadata generation.

2017-06-20 Thread Alexey Bader via cfe-commits
Author: bader Date: Tue Jun 20 09:30:18 2017 New Revision: 305796 URL: http://llvm.org/viewvc/llvm-project?rev=305796&view=rev Log: [OpenCL] Fix OpenCL and SPIR version metadata generation. Summary: OpenCL and SPIR version metadata must be generated once per module instead of once per mangled gl

[PATCH] D34263: [preprocessor] When preprocessor option 'SingleFileParseMode' is enabled, parse all directive blocks if the condition uses undefined macros

2017-06-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305797: [preprocessor] When preprocessor option 'SingleFileParseMode' is enabled, parse… (authored by akirtzidis). Changed prior to commit: https://reviews.llvm.org/D34263?vs=103067&id=103206#toc Repos

r305797 - [preprocessor] When preprocessor option 'SingleFileParseMode' is enabled, parse all directive blocks if the condition uses undefined macros

2017-06-20 Thread Argyrios Kyrtzidis via cfe-commits
Author: akirtzidis Date: Tue Jun 20 09:36:58 2017 New Revision: 305797 URL: http://llvm.org/viewvc/llvm-project?rev=305797&view=rev Log: [preprocessor] When preprocessor option 'SingleFileParseMode' is enabled, parse all directive blocks if the condition uses undefined macros This is useful for

[PATCH] D34287: Moved code hanlding precompiled preamble out of the ASTUnit.

2017-06-20 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: include/clang/Frontend/PrecompiledPreamble.h:124 +/// CanReusePreamble + AddImplicitPreamble to make use of it. +class PrecompiledPreamble { +public: ilya-biryukov wrote: > klimek wrote: > > If a user doesn't care about t

r305798 - [OpenCL] Diagnose scoped address-space qualified variables

2017-06-20 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Tue Jun 20 09:50:45 2017 New Revision: 305798 URL: http://llvm.org/viewvc/llvm-project?rev=305798&view=rev Log: [OpenCL] Diagnose scoped address-space qualified variables Produce an error if variables qualified with a local or a constant address space are not declared in the

[PATCH] D34024: [OpenCL] Diagnose scoped address-space qualified variables

2017-06-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305798: [OpenCL] Diagnose scoped address-space qualified variables (authored by stulova). Changed prior to commit: https://reviews.llvm.org/D34024?vs=101872&id=103207#toc Repository: rL LLVM https:/

r305799 - D31187: Fix removal of out-of-line definitions.

2017-06-20 Thread Vassil Vassilev via cfe-commits
Author: vvassilev Date: Tue Jun 20 09:59:57 2017 New Revision: 305799 URL: http://llvm.org/viewvc/llvm-project?rev=305799&view=rev Log: D31187: Fix removal of out-of-line definitions. Consider: struct MyClass { void f() {} } MyClass::f(){} // expected error redefinition of f. #1 Some clients

[PATCH] D31187: Fix removal of out-of-line definitions.

2017-06-20 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev closed this revision. v.g.vassilev added a comment. Landed in r305799. I would like to test it and I think that should be possible as soon as I land some interpreter infrastructure which is on my TODO list. https://reviews.llvm.org/D31187

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-20 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 103208. johannes marked 7 inline comments as done. https://reviews.llvm.org/D34329 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp lib/Tooling/ASTDiff/CMakeLists.txt lib/Tooling/CMakeLists.txt test/Tooling/clang-diff-

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCL/sampler.cl:62 + + const sampler_t const_smp = CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_LINEAR; + // CHECK: [[CONST_SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)* @__translate_sam

[PATCH] D34279: Fix release_40 build with MSVC (VS 2015)

2017-06-20 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. I still don't understand why this is breaking your build. Assuming this is the line the first error refers to: for (unsigned BinOp : {G_ADD, G_SUB, G_MUL, G_AND, G_OR, G_XOR, G_SHL}) { I don't see how converting G_ADD, even if it is an int, to unsigned would be a narrow

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-20 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes marked an inline comment as done. johannes added a comment. In https://reviews.llvm.org/D34329#785190, @arphaman wrote: > Looking at the output of the tool, I have the following suggestion: > > - We should avoid implicit expressions (We don't need to see things like > `Insert ImplicitCa

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:474 +for (SNodeId D1 = LMD1 + 1; D1 <= Id1; ++D1) { + double DeletionCost = 1.0; + ForestDist[D1][LMD2] = ForestDist[D1 - 1][LMD2] + DeletionCost; johannes wrote: > arphaman

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:303 +/// Identifies a node in this subtree by its postorder offset. +using SNodeId = int; + What's the difference between `SNodeId` and `NodeId`? https://reviews.llvm.org/D34329

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:171 + +std::string TreeRoot::label(NodeId Id) const { + const Node &N = getNode(Id); I believe that this method that you call `label` actually represents the `value` attribute that's de

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-20 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added inline comments. Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:303 +/// Identifies a node in this subtree by its postorder offset. +using SNodeId = int; + arphaman wrote: > What's the difference between `SNodeId` and `NodeId`? NodeId is the preorder

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:303 +/// Identifies a node in this subtree by its postorder offset. +using SNodeId = int; + johannes wrote: > arphaman wrote: > > What's the difference between `SNodeId` and `NodeId`? > N

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-20 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added inline comments. Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:171 + +std::string TreeRoot::label(NodeId Id) const { + const Node &N = getNode(Id); arphaman wrote: > I believe that this method that you call `label` actually represents the > `value`

Re: r305719 - [Parser][ObjC] Use an artificial EOF token while parsing lexed ObjC methods

2017-06-20 Thread Duncan P. N. Exon Smith via cfe-commits
> On Jun 19, 2017, at 10:53, Alex Lorenz via cfe-commits > wrote: > > Author: arphaman > Date: Mon Jun 19 12:53:21 2017 > New Revision: 305719 > > URL: http://llvm.org/viewvc/llvm-project?rev=305719&view=rev > Log: > [Parser][ObjC] Use an artificial EOF token while parsing lexed ObjC methods >

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-06-20 Thread wangxin via Phabricator via cfe-commits
wangxindsb marked 5 inline comments as done. wangxindsb added inline comments. Comment at: VirtualCallChecker.cpp:260 + if (SFC->inTopFrame()) { + const FunctionDecl *FD = SFC->getDecl()->getAsFunction(); +if (!FD) xazax.hun wrote: > The formatting seems to

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-20 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Wow... Nice catch. For some reason I can't reproduce the problem neither. I will drop source code change, but I'd like to modify the test anyway. https://reviews.llvm.org/rL277024 added test/CodeGenOpenCL/sampler.cl and modified test/SemaOpenCL/sampler_t.cl. I want to move

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

2017-06-20 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:4128 +return true; +} + I don't understand the difference you're creating between traits here. Three specific traits about destructibility allow incomplete array types regardless

RE: r284060 - Implement MS _BitScan intrinsics

2017-06-20 Thread Erik Schwiebert via cfe-commits
LGTM, assuming "howLong" == 0 means 32-bit int. 😊 -Original Message- From: Bruno Cardoso Lopes [mailto:bruno.card...@gmail.com] Sent: Monday, June 19, 2017 6:45 PM To: Duncan P. N. Exon Smith Cc: Reid Kleckner ; Erik Schwiebert ; Brian Kelley ; Tomasz Kukielka ; cfe-commits Subject: R

[PATCH] D34287: Moved code hanlding precompiled preamble out of the ASTUnit.

2017-06-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 103216. ilya-biryukov added a comment. - Made TempPCHFile an inner class of PrecompiledPreamble. - Made PreambleFileHash an inner class of PrecompiledPreamble. - Changed stanalone functions to members. - Removed some member accessors that were no longer

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-06-20 Thread wangxin via Phabricator via cfe-commits
wangxindsb updated this revision to Diff 103214. wangxindsb added a comment. Correct some error in VirtualCallChecker.cpp. Complete the test case. https://reviews.llvm.org/D34275 Files: lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp test/Analysis/virtualcall.cpp Index: test/Analysis/vi

[PATCH] D34367: CodeGen: Fix address space of indirect function argument

2017-06-20 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGCall.cpp:1605 + ? CGM.getDataLayout().getAllocaAddrSpace() + : getContext().getTargetAddressSpace(LangAS::Default)); break; Everything about your reasoning seems to apply t

[PATCH] D34287: Moved code hanlding precompiled preamble out of the ASTUnit.

2017-06-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: include/clang/Frontend/PrecompiledPreamble.h:124 +/// CanReusePreamble + AddImplicitPreamble to make use of it. +class PrecompiledPreamble { +public: klimek wrote: > ilya-biryukov wrote: > > klimek wrote: > > > If

r305803 - Split the expectations in tests from r305719 over multiple lines to

2017-06-20 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Jun 20 11:12:26 2017 New Revision: 305803 URL: http://llvm.org/viewvc/llvm-project?rev=305803&view=rev Log: Split the expectations in tests from r305719 over multiple lines to enhance readability As suggested by Duncan Exon Smith! Modified: cfe/trunk/test/Parser/ob

Re: r305719 - [Parser][ObjC] Use an artificial EOF token while parsing lexed ObjC methods

2017-06-20 Thread Alex L via cfe-commits
On 20 June 2017 at 16:53, Duncan P. N. Exon Smith wrote: > > On Jun 19, 2017, at 10:53, Alex Lorenz via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > Author: arphaman > Date: Mon Jun 19 12:53:21 2017 > New Revision: 305719 > > URL: http://llvm.org/viewvc/llvm-project?rev=305719&view=rev

r305804 - Add a missing '[' to the tests from r305719

2017-06-20 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Jun 20 11:16:11 2017 New Revision: 305804 URL: http://llvm.org/viewvc/llvm-project?rev=305804&view=rev Log: Add a missing '[' to the tests from r305719 This clarifies the tests as the missing ']' is important, and not the '['. Modified: cfe/trunk/test/Parser/objc-a

[PATCH] D34277: [analyzer] Bump default performance thresholds?

2017-06-20 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > In particular, there are patches to generate more symbolic expressions, that > could also degrade the performance (but fix some fixmes along the way). The patch you are talking about might be promising, but needs much more investigation and tuning for performance vs

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

2017-06-20 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Basic/TargetInfo.h:959 + /// \brief Return the target address space which is read only and can be + /// casted to the generic address space. + virtual llvm::Optional getTargetConstantAddressSpace() const { -

[PATCH] D34370: Fix for Bug 33471: Preventing operator auto from resolving to a template operator.

2017-06-20 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 103224. erichkeane marked an inline comment as done. erichkeane added a comment. Hi @rsmith Thanks for the quick response! I spent a while going over it, and think I have what you were looking for. I Also added the operator auto * tests. https://revie

[PATCH] D34370: Fix for Bug 33471: Preventing operator auto from resolving to a template operator.

2017-06-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Looks good, thanks! Comment at: lib/Sema/SemaLookup.cpp:870 + DeclarationName::CXXConversionFunctionName && + R.getLookupName().getCXXNameType()->getContainedDe

r305805 - [GSoC] Flag value completion for clang

2017-06-20 Thread Yuka Takahashi via cfe-commits
Author: yamaguchi Date: Tue Jun 20 11:31:31 2017 New Revision: 305805 URL: http://llvm.org/viewvc/llvm-project?rev=305805&view=rev Log: [GSoC] Flag value completion for clang This is patch for GSoC project, bash-completion for clang. To use this on bash, please run `source clang/utils/bash-autoc

[PATCH] D34370: Fix for Bug 33471: Preventing operator auto from resolving to a template operator.

2017-06-20 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Sema/SemaLookup.cpp:870 + DeclarationName::CXXConversionFunctionName && + R.getLookupName().getCXXNameType()->getContainedDeducedType() && + R.getLookupName() rsmith wrote: > Maybe only call thi

[PATCH] D33383: [GSoC] Flag value completion for clang

2017-06-20 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi closed this revision. yamaguchi added a comment. Landed in https://reviews.llvm.org/rL305805. https://reviews.llvm.org/D33383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D28691: Add OpenCL 2.0 atomic builtin functions as Clang builtin

2017-06-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/Builtins.def:713 +ATOMIC_BUILTIN(__opencl_atomic_fetch_or, "v.", "t") +ATOMIC_BUILTIN(__opencl_atomic_fetch_xor, "v.", "t") + What about min/max? I believe they will need to have the scope too. =

[PATCH] D34377: Support MS builtins using 'long' on Darwin/LP64

2017-06-20 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: include/clang/Basic/Builtins.def:55 // W -> int64_t +// l -> 'int' if builtin is a MS extensions and the target is Darwin/LP64. +// Defaults to 'L' otherwise. majnemer wrote: > Why not just LP64? Seems arbitra

[PATCH] D34367: CodeGen: Fix address space of indirect function argument

2017-06-20 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/CodeGen/CGCall.cpp:1605 + ? CGM.getDataLayout().getAllocaAddrSpace() + : getContext().getTargetAddressSpace(LangAS::Default)); break; rjmccall wrote: > Everything about your reasoning

r305812 - Fix for Bug 33471: Preventing operator auto from resolving to a template operator.

2017-06-20 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Tue Jun 20 12:38:07 2017 New Revision: 305812 URL: http://llvm.org/viewvc/llvm-project?rev=305812&view=rev Log: Fix for Bug 33471: Preventing operator auto from resolving to a template operator. As the bug report says, struct A { template operator T(); }; void foo()

[PATCH] D34370: Fix for Bug 33471: Preventing operator auto from resolving to a template operator.

2017-06-20 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305812: Fix for Bug 33471: Preventing operator auto from resolving to a template… (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D34370?vs=103224&id=103235#toc Repository:

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

2017-06-20 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. > Can we drop computing these for some expressions that we know the > RangeConstraintManager will not utilize? It's possible, though I'm not sure what the actual limitations of the RangeConstraintManager are, since there are a lot of intermediate steps that attempt to tra

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

2017-06-20 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 103239. ddcc added a comment. Rebase, decrease simplification complexity https://reviews.llvm.org/D28953 Files: include/clang/StaticAnalyzer/Checkers/SValExplainer.h lib/StaticAnalyzer/Core/SValBuilder.cpp lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp

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

2017-06-20 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. I forgot to mention that the only remaining test failure is on `plist-macros.cpp`; there is a `Assuming condition is true` path note that only appears with the RangeConstraintManager but not with Z3ConstraintManager, and I can't `#ifdef` it because the annotations are chec

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

2017-06-20 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added inline comments. Comment at: include/clang/Basic/TargetInfo.h:959 + /// \brief Return the target address space which is read only and can be + /// casted to the generic address space. + virtual llvm::Optional getTargetConst

[PATCH] D34367: CodeGen: Fix address space of indirect function argument

2017-06-20 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGCall.cpp:1605 + ? CGM.getDataLayout().getAllocaAddrSpace() + : getContext().getTargetAddressSpace(LangAS::Default)); break; yaxunl wrote: > rjmccall wrote: > > Everything a

[PATCH] D33953: [libcxx] [test] Add more tests to tuple_size_structured_bindings.pass.cpp and make it friendlier to C1XX.

2017-06-20 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added a comment. Ping? https://reviews.llvm.org/D33953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34210: Add __has_feature(leak_sanitizer)

2017-06-20 Thread Francis Ricci via Phabricator via cfe-commits
fjricci reclaimed this revision. fjricci added a comment. As I've looked into this further, I do think we need `has_feature(leak_sanitizer)` after all. For example, if a user program calls `pthread_create()` with a custom stack size, leak sanitizer will intercept the call to `pthread_create()`,

[libcxx] r305829 - Creating release candidate final from release_401 branch

2017-06-20 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Tue Jun 20 14:29:48 2017 New Revision: 305829 URL: http://llvm.org/viewvc/llvm-project?rev=305829&view=rev Log: Creating release candidate final from release_401 branch Added: libcxx/tags/RELEASE_401/final/ (props changed) - copied from r305828, libcxx/branches/

[libcxxabi] r305830 - Creating release candidate final from release_401 branch

2017-06-20 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Tue Jun 20 14:29:53 2017 New Revision: 305830 URL: http://llvm.org/viewvc/llvm-project?rev=305830&view=rev Log: Creating release candidate final from release_401 branch Added: libcxxabi/tags/RELEASE_401/final/ (props changed) - copied from r305829, libcxxabi/bra

[libunwind] r305836 - Creating release candidate final from release_401 branch

2017-06-20 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Tue Jun 20 14:30:24 2017 New Revision: 305836 URL: http://llvm.org/viewvc/llvm-project?rev=305836&view=rev Log: Creating release candidate final from release_401 branch Added: libunwind/tags/RELEASE_401/final/ (props changed) - copied from r305835, libunwind/bra

[PATCH] D34210: Add __has_feature(leak_sanitizer)

2017-06-20 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. If LSan is a runtime thing, why not use weak hooks or something to detect LSan at runtime instead of using a macro? https://reviews.llvm.org/D34210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D34294: Rework libcxx strerror_r handling.

2017-06-20 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. EricWF, wdyt? https://reviews.llvm.org/D34294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34266: Static Analyzer - Localizability Checker: New Localizable APIs for macOS High Sierra & iOS 11

2017-06-20 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > Hmm, should there be new tests that demonstrate that we cover the new APIs? Unless we use a new registration mechanism for some of these APIs, I'd be fine without adding a test for every API that has localization constraints. Repository: rL LLVM https://reviews.

[libcxx] r305841 - Fix discovery of cxxabi.h in the monorepo layout

2017-06-20 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Jun 20 15:34:13 2017 New Revision: 305841 URL: http://llvm.org/viewvc/llvm-project?rev=305841&view=rev Log: Fix discovery of cxxabi.h in the monorepo layout Modified: libcxx/trunk/CMakeLists.txt Modified: libcxx/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-pro

[libcxx] r305843 - [libcxx] [test] Add more tests to tuple_size_structured_bindings.pass.cpp and make it friendlier to C1XX.

2017-06-20 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft Date: Tue Jun 20 15:34:50 2017 New Revision: 305843 URL: http://llvm.org/viewvc/llvm-project?rev=305843&view=rev Log: [libcxx] [test] Add more tests to tuple_size_structured_bindings.pass.cpp and make it friendlier to C1XX. Style/paranoia: 42.1 doesn't have an exact binary repre

[PATCH] D34377: Support MS builtins using 'long' on Darwin/LP64

2017-06-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: include/clang/Basic/Builtins.def:55 // W -> int64_t +// l -> 'int' if builtin is a MS extensions and the target is Darwin/LP64. +// Defaults to 'L' otherwise. rnk wrote: > majnemer wrote: > > Why not just LP

r305845 - [clang] Fix format specifiers fixits for nested macros

2017-06-20 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Tue Jun 20 15:46:58 2017 New Revision: 305845 URL: http://llvm.org/viewvc/llvm-project?rev=305845&view=rev Log: [clang] Fix format specifiers fixits for nested macros ExpansionLoc was previously calculated incorrectly in the case of nested macros expansions. In this diff w

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-20 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305845: [clang] Fix format specifiers fixits for nested macros (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D34268?vs=103093&id=103262#toc Repository: rL LLVM https://re

[PATCH] D34417: Switch TestVisitor to Lang_C via -x c

2017-06-20 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg created this revision. ...instead of -std=c99, as the latter lead to error: invalid argument '-std=c99' not allowed with 'C++' complaints in test logs https://reviews.llvm.org/D34417 Files: unittests/Tooling/TestVisitor.h Index: unittests/Tooling/TestVisitor.h

[libcxx] r305848 - [libcxx] [test] Strip trailing whitespace. NFC.

2017-06-20 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft Date: Tue Jun 20 16:00:02 2017 New Revision: 305848 URL: http://llvm.org/viewvc/llvm-project?rev=305848&view=rev Log: [libcxx] [test] Strip trailing whitespace. NFC. Modified: libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp libcxx/trunk

r305850 - Preserve CXX method overrides in ASTImporter

2017-06-20 Thread Lang Hames via cfe-commits
Author: lhames Date: Tue Jun 20 16:06:00 2017 New Revision: 305850 URL: http://llvm.org/viewvc/llvm-project?rev=305850&view=rev Log: Preserve CXX method overrides in ASTImporter Summary: The ASTImporter should import CXX method overrides from the source context when it imports a method decl. Rev

[PATCH] D34419: Make sure TraverseInitListExpr visits InitListExpr exactly twice

2017-06-20 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg created this revision. ... once each for the syntactic and semantic form. Without this fix, behavior of the newly added tests would have been InitListExprIsPreOrderVisitedTwice: syntactic: 1 semantic: 2 InitListExprIsPostOrderVisitedTwice: syntactic: 0 semantic: 1 InitListExprIsPre

[libcxx] r305854 - [libcxx] [test] Fix -Wmismatched-tags in tuple_size_structured_bindings.pass.cpp.

2017-06-20 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft Date: Tue Jun 20 16:10:53 2017 New Revision: 305854 URL: http://llvm.org/viewvc/llvm-project?rev=305854&view=rev Log: [libcxx] [test] Fix -Wmismatched-tags in tuple_size_structured_bindings.pass.cpp. Clang and C1XX both complain about mismatched class/struct, but libc++ and MSV

[PATCH] D34377: Support MS builtins using 'long' on Darwin/LP64

2017-06-20 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: lib/AST/ASTContext.cpp:8551 + break; +} case 'W': bruno wrote: > bruno wrote: > > rnk wrote: > > > compnerd wrote: > > > > I agree with @majnemer. Why not base this on the Int64Type? > > > I'd suggest thi

Re: r305850 - Preserve CXX method overrides in ASTImporter

2017-06-20 Thread Lang Hames via cfe-commits
Oops - this broke Sema/ms_class_layout.cpp. Looking in to it now... - Lang. On Tue, Jun 20, 2017 at 2:06 PM, Lang Hames via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: lhames > Date: Tue Jun 20 16:06:00 2017 > New Revision: 305850 > > URL: http://llvm.org/viewvc/llvm-project?rev=3

[PATCH] D34377: Support MS builtins using 'long' on Darwin/LP64

2017-06-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: lib/AST/ASTContext.cpp:8551 + break; +} case 'W': majnemer wrote: > bruno wrote: > > bruno wrote: > > > rnk wrote: > > > > compnerd wrote: > > > > > I agree with @majnemer. Why not base this on the Int64Type

[PATCH] D34377: Support MS builtins using 'long' on Darwin/LP64

2017-06-20 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/AST/ASTContext.cpp:8551 + break; +} case 'W': majnemer wrote: > bruno wrote: > > bruno wrote: > > > rnk wrote: > > > > compnerd wrote: > > > > > I agree with @majnemer. Why not base this on the Int64Type?

[PATCH] D34377: Support MS builtins using 'long' on Darwin/LP64

2017-06-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: lib/AST/ASTContext.cpp:8551 + break; +} case 'W': bruno wrote: > rnk wrote: > > majnemer wrote: > > > bruno wrote: > > > > bruno wrote: > > > > > rnk wrote: > > > > > > compnerd wrote: > > > > > > > I agree w

r305860 - Special-case handling of destructors in override lists when dumping ASTs.

2017-06-20 Thread Lang Hames via cfe-commits
Author: lhames Date: Tue Jun 20 16:30:43 2017 New Revision: 305860 URL: http://llvm.org/viewvc/llvm-project?rev=305860&view=rev Log: Special-case handling of destructors in override lists when dumping ASTs. Fixes a bug in r305850: CXXDestructors don't have names, so we need to handle printing of

  1   2   >