[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-04-14 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 95369. bruno marked 2 inline comments as done. bruno added a comment. Updated the patch after Richard's comments: Before -- In file included from x.c:2: Inputs4/C.h:3:5: error: redefinition of 'c' int c = 1; ^ In module 'X' imported from

[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-04-14 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. @v.g.vassilev your testcase is interesting but it's unrelated to this specific improvement. The error message it's triggered by (a) the decl name not being found because `kROOTD_OPEN` is hidden, (b) type transforms looks for an alternative (c)

r300389 - [ObjC] Use empty Objective-C collection literal constants when

2017-04-14 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Sat Apr 15 00:31:35 2017 New Revision: 300389 URL: http://llvm.org/viewvc/llvm-project?rev=300389=rev Log: [ObjC] Use empty Objective-C collection literal constants when available. Original patch by Douglas Gregor with minor modifications. rdar://problem/20689633 Added:

r300382 - [Coverage] Use the new getInstrProfSectionName API (NFC)

2017-04-14 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Apr 14 19:10:05 2017 New Revision: 300382 URL: http://llvm.org/viewvc/llvm-project?rev=300382=rev Log: [Coverage] Use the new getInstrProfSectionName API (NFC) Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp Modified:

[PATCH] D30283: [ubsan] Reduce alignment checking of C++ object pointers

2017-04-14 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Thanks for the review! Comment at: test/CodeGenCXX/ubsan-suppress-checks.cpp:25 +// LAMBDA: and i64 %[[THISINT2]], 3, !nosanitize +// LAMBDA: call void @__ubsan_handle_type_mismatch + efriedma wrote: > LAMBDA-NOT: call void

[PATCH] D32107: [libc++][test] LWG2857 test coverage for variant

2017-04-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Give me a day to implement this in variant and then this should be ready to land. https://reviews.llvm.org/D32107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r300370 - [ubsan] Reduce alignment checking of C++ object pointers

2017-04-14 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Apr 14 17:03:34 2017 New Revision: 300370 URL: http://llvm.org/viewvc/llvm-project?rev=300370=rev Log: [ubsan] Reduce alignment checking of C++ object pointers This patch teaches ubsan to insert an alignment check for the 'this' pointer at the start of each

[PATCH] D30283: [ubsan] Reduce alignment checking of C++ object pointers

2017-04-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300370: [ubsan] Reduce alignment checking of C++ object pointers (authored by vedantk). Changed prior to commit: https://reviews.llvm.org/D30283?vs=95053=95352#toc Repository: rL LLVM

r300371 - [ubsan] Don't check alignment if the alignment is 1

2017-04-14 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Apr 14 17:03:37 2017 New Revision: 300371 URL: http://llvm.org/viewvc/llvm-project?rev=300371=rev Log: [ubsan] Don't check alignment if the alignment is 1 If a pointer is 1-byte aligned, there's no use in checking its alignment. Somewhat surprisingly, ubsan can spend a

LLVM buildmaster will go off-line today after 5PM for short time

2017-04-14 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM buildmaster will be off-line today for about half hour after 5PM Pacific time for maintenance. Thank you for understanding. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r299226 - [Modules][PCH] Serialize #pragma pack

2017-04-14 Thread Duncan P. N. Exon Smith via cfe-commits
FYI, I reverted the modules side of this in r300380. For details, see the commit message. TL;DR: this didn't actually make modules builds closer to matching non-modules builds, thanks to how submodules work; on the contrary, it made them diverge. > On 2017-Mar-31, at 08:36, Alex Lorenz via

r300380 - Modules: Do not serialize #pragma pack state

2017-04-14 Thread Duncan P. N. Exon Smith via cfe-commits
Author: dexonsmith Date: Fri Apr 14 19:07:57 2017 New Revision: 300380 URL: http://llvm.org/viewvc/llvm-project?rev=300380=rev Log: Modules: Do not serialize #pragma pack state The modules side of r299226, which serializes #pragma pack state, doesn't work well. The main purpose was to make

[PATCH] D32106: [libcxx][test] Expand LWG2857 coverage

2017-04-14 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. - Cover `optional`'s emplace-from-`initializer_list` overload - Verify that `any::emplace` and `optional::emplace` return a reference to the correct type even for throwing cases https://reviews.llvm.org/D32106 Files:

[PATCH] D32107: [libc++][test] LWG2857 test coverage for variant

2017-04-14 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. As the saying goes, "works on my machine." NOTE: libc++ variant does not yet implement LWG2857 and will not pass these tests; MSVC variant does. Changes under `TEST_VARIANT_HAS_NO_REFERENCES` are dry-coded; I figure that's better than nothing.

[libcxx] r300390 - [libcxx] Fix check-cxx-abilist on OS X

2017-04-14 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Sat Apr 15 00:41:45 2017 New Revision: 300390 URL: http://llvm.org/viewvc/llvm-project?rev=300390=rev Log: [libcxx] Fix check-cxx-abilist on OS X Summary: Recent commits broke the check-cxx-abilist by changing the default OS X to use `-rexport_library` instead of

[PATCH] D30285: [ubsan] Don't check alignment if the alignment is 1

2017-04-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300371: [ubsan] Don't check alignment if the alignment is 1 (authored by vedantk). Changed prior to commit: https://reviews.llvm.org/D30285?vs=89458=95353#toc Repository: rL LLVM

[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-04-14 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno marked 5 inline comments as done. bruno added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8708 +def note_redefinition_modules_same_file : Note< + "'%0' included multiple times, additional (likely non-modular) include site in module

[libcxx] r300387 - Make clang-format use C++03 syntax

2017-04-14 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Apr 14 21:45:43 2017 New Revision: 300387 URL: http://llvm.org/viewvc/llvm-project?rev=300387=rev Log: Make clang-format use C++03 syntax Modified: libcxx/trunk/.clang-format Modified: libcxx/trunk/.clang-format URL:

[PATCH] D32107: [libc++][test] LWG2857 test coverage for variant

2017-04-14 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter added a comment. In https://reviews.llvm.org/D32107#727751, @EricWF wrote: > Give me a day to implement this in variant and then this should be ready to > land. No rush; the patch isn't going anywhere ;) https://reviews.llvm.org/D32107

r300391 - Revert "[ObjC] Use empty Objective-C collection literal constants when"

2017-04-14 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Sat Apr 15 00:44:27 2017 New Revision: 300391 URL: http://llvm.org/viewvc/llvm-project?rev=300391=rev Log: Revert "[ObjC] Use empty Objective-C collection literal constants when" This reverts commit r300389. There were mistakes in the changes I made to CodeGen. Removed:

[PATCH] D32029: [ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt

2017-04-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Those test changes are smaller than I thought they might be; great. https://reviews.llvm.org/D32029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32014: Remove unused varible

2017-04-14 Thread Wei-Ren Chen via Phabricator via cfe-commits
chenwj added a comment. Ping? :-) https://reviews.llvm.org/D32014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31868: [analyzer] Check NULL pointer dereference issue for memset function

2017-04-14 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai updated this revision to Diff 95273. xiangzhai added a comment. Hi All, I have updated my patch as your suggestion, please review it, thanks a lot! Regards, Leslie Zhai Repository: rL LLVM https://reviews.llvm.org/D31868 Files: lib/StaticAnalyzer/Checkers/CStringChecker.cpp

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-04-14 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added inline comments. Comment at: test/SemaOpenCL/clang-builtin-version.cl:32 + work_group_reserve_write_pipe(tmp, tmp); // expected-error{{implicit declaration of function 'work_group_reserve_write_pipe' is invalid in OpenCL}} + // expected-note@-1{{did you mean

r300313 - PR32280: Do not crash on nested initializers.

2017-04-14 Thread Vassil Vassilev via cfe-commits
Author: vvassilev Date: Fri Apr 14 03:48:08 2017 New Revision: 300313 URL: http://llvm.org/viewvc/llvm-project?rev=300313=rev Log: PR32280: Do not crash on nested initializers. Patch by Yuka Takahashi (D31591)! Modified: cfe/trunk/lib/Sema/SemaInit.cpp

[PATCH] D31591: Fix a bug which access nullptr and cause segmentation fault

2017-04-14 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Landed in r300313. https://reviews.llvm.org/D31591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D15006: Driver: Better detection of mingw-gcc

2017-04-14 Thread Martell Malone via Phabricator via cfe-commits
martell updated this revision to Diff 95292. martell edited the summary of this revision. martell added a reviewer: yaron.keren. martell added a subscriber: yaron.keren. martell added a comment. After the revert I left this patch go to pick up some other patch work. Seen as we are not anywhere

[PATCH] D15006: Driver: Better detection of mingw-gcc

2017-04-14 Thread Martell Malone via Phabricator via cfe-commits
martell added a comment. To clarify the most import part about actually being able to test this is the being able to modify the PATH variable for windows and unix hosts in the test case. The program prefix is less of a problem because I can double down with the same empty file one with .exe

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

2017-04-14 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. I'm not sure this is the right way to do this; I suspect we're lumping together a bunch of different bugs: 1. vector types need to have tbaa which makes them alias with their element types [to be clear, as vector types are an implementation extension, this is our

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This patch is based on the RFC that I've sent out earlier (http://lists.llvm.org/pipermail/cfe-dev/2017-April/053394.html). It teaches Clang's Lexer to recognize the editor placeholders that are produced by some editors like Xcode when expanding code-completion

[PATCH] D31996: Make Gentoo GNU GCC Config override whitespace tolerant

2017-04-14 Thread Michał Górny via Phabricator via cfe-commits
mgorny accepted this revision. mgorny added a comment. This revision is now accepted and ready to land. Is there any specific reason you need this? Since the file is autogenerated, I don't think it matters very much to allow extra whiespace. But then, I do not think it hurts, so feel free to do

[PATCH] D31869: Register isStaticStorageClass matcher

2017-04-14 Thread Dave Lee via Phabricator via cfe-commits
kastiglione added a comment. Thanks! I don't have commit access, so if anyone wants to commit this, that would be great. https://reviews.llvm.org/D31869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] r300324 - Silence -Wlogical-op-parentheses warning NFC

2017-04-14 Thread Nirav Dave via cfe-commits
Author: niravd Date: Fri Apr 14 09:36:45 2017 New Revision: 300324 URL: http://llvm.org/viewvc/llvm-project?rev=300324=rev Log: Silence -Wlogical-op-parentheses warning NFC Modified: clang-tools-extra/trunk/clang-tidy/misc/ForwardingReferenceOverloadCheck.cpp Modified:

[PATCH] D32084: AMDGPU/GFX9: Set +fast-fmaf for >=gfx900 unless -cl-denorms-are-zero is set

2017-04-14 Thread Konstantin Zhuravlyov via Phabricator via cfe-commits
kzhuravl created this revision. Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, wdng. https://reviews.llvm.org/D32084 Files: lib/Basic/Targets.cpp test/CodeGenOpenCL/gfx9-fast-fmaf.cl Index: test/CodeGenOpenCL/gfx9-fast-fmaf.cl

[clang-tools-extra] r300320 - [clang-tidy] Fixes to misc-forwarding-reference-overload check.

2017-04-14 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Fri Apr 14 07:31:36 2017 New Revision: 300320 URL: http://llvm.org/viewvc/llvm-project?rev=300320=rev Log: [clang-tidy] Fixes to misc-forwarding-reference-overload check. * Style fixes to tests * Make it work consistently on all platforms Patch by András Leitereg! Modified:

[PATCH] D31167: Use FPContractModeKind universally

2017-04-14 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220 +/// \brief FP_CONTRACT mode (on/off/fast). +ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP contraction type") LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field

[PATCH] D32035: [OpenMP] Error when trying to offload to an unsupported architecture

2017-04-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:2242-2253 + if (!(TT.getArch() == llvm::Triple::ppc || +TT.getArch() == llvm::Triple::ppc64 || +TT.getArch() == llvm::Triple::ppc64le || +TT.getArch() ==

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 95297. arphaman added a comment. I've decided to treat each placeholder as an identifier token (like Swift) instead of just lexing the contents. This will prevent spurious errors for declaration name placeholders that have spaces or hyphens inside.

[PATCH] D32084: AMDGPU/GFX9: Set +fast-fmaf for >=gfx900 unless -cl-denorms-are-zero is set

2017-04-14 Thread Konstantin Zhuravlyov via Phabricator via cfe-commits
kzhuravl updated this revision to Diff 95299. kzhuravl added a comment. Add \n to test file. https://reviews.llvm.org/D32084 Files: lib/Basic/Targets.cpp test/CodeGenOpenCL/gfx9-fast-fmaf.cl Index: test/CodeGenOpenCL/gfx9-fast-fmaf.cl

[PATCH] D31766: [Clang][X86][SSE] Update MOVNTDQA non-temporal loads to generic implementation

2017-04-14 Thread Simon Pilgrim via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300326: [X86][SSE] Update MOVNTDQA non-temporal loads to generic implementation (clang) (authored by RKSimon). Changed prior to commit: https://reviews.llvm.org/D31766?vs=94379=95303#toc Repository:

r300328 - Make Gentoo GNU GCC Config override whitespace tolerant

2017-04-14 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Fri Apr 14 10:21:18 2017 New Revision: 300328 URL: http://llvm.org/viewvc/llvm-project?rev=300328=rev Log: Make Gentoo GNU GCC Config override whitespace tolerant The config-*triple* file handling isn't tolerant of leading/trailing whitespace, making it not terribly

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

2017-04-14 Thread Daniel Berlin via Phabricator via cfe-commits
dberlin added a comment. In https://reviews.llvm.org/D31885#727167, @hfinkel wrote: > I'm not sure this is the right way to do this; I suspect we're lumping > together a bunch of different bugs: > > 1. vector types need to have tbaa which makes them alias with their element > types [to be

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

2017-04-14 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D31885#727307, @kparzysz wrote: > This is not meant as a fine-grained solution to the TBAA problem, but a > temporary fix for generating wrong information. Just yesterday I helped > diagnose yet another problem related to this, so this

[PATCH] D15006: Driver: Better detection of mingw-gcc

2017-04-14 Thread Yaron Keren via Phabricator via cfe-commits
yaron.keren added reviewers: mati865, rnk. yaron.keren added a comment. Adding Mateusz and Reid. Repository: rL LLVM https://reviews.llvm.org/D15006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r300326 - [X86][SSE] Update MOVNTDQA non-temporal loads to generic implementation (clang)

2017-04-14 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Fri Apr 14 10:05:57 2017 New Revision: 300326 URL: http://llvm.org/viewvc/llvm-project?rev=300326=rev Log: [X86][SSE] Update MOVNTDQA non-temporal loads to generic implementation (clang) MOVNTDQA non-temporal aligned vector loads can be correctly represented using generic

[PATCH] D31996: Make Gentoo GNU GCC Config override whitespace tolerant

2017-04-14 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. Well, I've just checked gcc-config sources and it seems that it sources the file through bash, and gets the resulting `${CURRENT}`. While I don't think we ought to do complete bash support here, I guess allowing the same degree of whitespace bash does makes sense.

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

2017-04-14 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz added a comment. This is not meant as a fine-grained solution to the TBAA problem, but a temporary fix for generating wrong information. Just yesterday I helped diagnose yet another problem related to this, so this issue is causing trouble out there. Repository: rL LLVM

[PATCH] D31996: Make Gentoo GNU GCC Config override whitespace tolerant

2017-04-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D31996#727229, @mgorny wrote: > Is there any specific reason you need this? Since the file is autogenerated, > I don't think it matters very much to allow extra whiespace. But then, I do > not think it hurts, so feel free to do it. The

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

2017-04-14 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. > I'm not sure about the solution to #2, because i thought there were very > specific points in time at which the effective type could change. I think this is a key point. I'm not sure that there are specific points that the frontend can deduce: union U { int i;

[clang-tools-extra] r300356 - [clang-move] Create ClangMoveActionFactory on stack

2017-04-14 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Fri Apr 14 13:12:11 2017 New Revision: 300356 URL: http://llvm.org/viewvc/llvm-project?rev=300356=rev Log: [clang-move] Create ClangMoveActionFactory on stack This diff removes unnecessary using of unique_ptr with ClangMoveActionFactory (pico cleanup). NFC Test plan:

[PATCH] D32063: [clang-move] cleanup: create ClangMoveActionFactory on the stack

2017-04-14 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300356: [clang-move] Create ClangMoveActionFactory on stack (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D32063?vs=95233=95326#toc Repository: rL LLVM

[PATCH] D32010: [indexer] Record class template specializations using a new 'SpecializationOf' relationship

2017-04-14 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D32010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32092: Attribute inline

2017-04-14 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. ksh-3.2$ cat test3.c static void __declspec(inline) foo() { } int main() { foo(); } ksh-3.2$ cl test3.c Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64 Copyright (C) Microsoft Corporation. All rights reserved. test3.c Microsoft (R)

[PATCH] D32092: Attribute inline

2017-04-14 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. Forgot to mention that this is for C only. CL doesn't compile this declaration in a C++ context. Please see: https://godbolt.org/g/WRhyjL https://reviews.llvm.org/D32092 ___ cfe-commits mailing list

[PATCH] D32092: Attribute inline

2017-04-14 Thread Richard Smith via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/Attr.td:869 def GNUInline : InheritableAttr { - let Spellings = [GCC<"gnu_inline">]; + let Spellings = [GCC<"gnu_inline">, Declspec<"inline">]; let Subjects = SubjectList<[Function]>;

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

2017-04-14 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz added a comment. I'm not really concerned about the approach here---I can abandon this patch if you have something better. You have two testcases. One is based on an issue that our customer encountered. As long as TBAA doesn't produce false negatives, it's all good. Repository:

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-14 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. Rather than stick ranges into the diagnostic engine, I think it would be cleaner to have the identifier have a method like `isEditorPlaceholder()` that can be used to avoid situations like this in a principled way, or to customize behaviour for placeholders in the

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

2017-04-14 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D31885#727371, @efriedma wrote: > In https://reviews.llvm.org/D31885#727167, @hfinkel wrote: > > > I'm not sure this is the right way to do this; I suspect we're lumping > > together a bunch of different bugs: > > > > 1. vector types need to

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-14 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. > What do you think about a hybrid approach: Don't suppress diagnostics in the > placeholder range when we handle the placeholders in parser/sema, but do > suppress the range when the placeholder isn't explicitly handled? I'd really rather not plumb this into the

[PATCH] D32092: Attribute inline

2017-04-14 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. From some very superficial testing, it looks like CL treats `__declspec(inline)` exactly like a synonym for `inline` (it even rejects them both appearing on the same declaration, complaining about a duplicate `inline` specifier). So modeling this as `GNUInlineAttr` is

[PATCH] D31996: Make Gentoo GNU GCC Config override whitespace tolerant

2017-04-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane closed this revision. erichkeane added a comment. Forgot the "DifferentialRevision" in the commit message, but added it as related here. https://reviews.llvm.org/D31996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r300340 - [ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt [take 2]

2017-04-14 Thread Kuba Mracek via cfe-commits
Author: kuba.brecka Date: Fri Apr 14 11:53:25 2017 New Revision: 300340 URL: http://llvm.org/viewvc/llvm-project?rev=300340=rev Log: [ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt [take 2] CodeGenFunction::EmitObjCForCollectionStmt currently emits lifetime markers for

[PATCH] D32029: [ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt

2017-04-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300340: [ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt [take… (authored by kuba.brecka). Changed prior to commit: https://reviews.llvm.org/D32029?vs=95271=95313#toc

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

2017-04-14 Thread Daniel Berlin via Phabricator via cfe-commits
dberlin added a comment. In https://reviews.llvm.org/D31885#727352, @hfinkel wrote: > > I'm not sure about the solution to #2, because i thought there were very > > specific points in time at which the effective type could change. > > I think this is a key point. I'm not sure that there are

Re: r300295 - [docs] UBSan: Mention that print_stacktrace=1 is unsupported on Darwin

2017-04-14 Thread Vedant Kumar via cfe-commits
I hacked the UBSan runtime locally to use the fast unwinder. I thought this "worked", but it seems to only print one frame. This explains why: 67 void BufferedStackTrace::FastUnwindStack(uptr pc, uptr bp, uptr stack_top,

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 95349. arphaman added a comment. Check if `IdentifierInfo` is nil in `ActOnIdExpression` to prevent crash. Repository: rL LLVM https://reviews.llvm.org/D32081 Files: include/clang/Basic/DiagnosticLexKinds.td include/clang/Basic/IdentifierTable.h

[PATCH] D31757: [clang-tidy] Add a clang-tidy check for possible inefficient vector operations

2017-04-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/performance/InefficientVectorOperationCheck.cpp:109-111 + auto AllVectorVarRefs = utils::decl_ref_expr::allDeclRefExprs( + *VectorVarDecl, *LoopParent, *Result.Context); + for (const auto *Ref : AllVectorVarRefs)

[PATCH] D32092: Attribute inline

2017-04-14 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam created this revision. Added support for attribute inline for a __declspec declaration. https://reviews.llvm.org/D32092 Files: include/clang/Basic/Attr.td lib/Parse/ParseDecl.cpp lib/Sema/SemaDeclAttr.cpp test/Sema/declspec-inline.c test\Sema\declspec-inline.c Index:

[PATCH] D32092: Attribute inline

2017-04-14 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. Yes it behaves the same way than the Gnu inline. https://reviews.llvm.org/D32092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32092: Attribute inline

2017-04-14 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D32092#727543, @zahiraam wrote: > Pushed the submit too fast ... > Before I submitted this review, I have done some experiments and inline and > declspec(inline) have the same behavior. Compiling with /Ob0 disables > inlining. With -O1 or

r300347 - Removing a redundant, but harmless, %s; NFC.

2017-04-14 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Apr 14 12:37:29 2017 New Revision: 300347 URL: http://llvm.org/viewvc/llvm-project?rev=300347=rev Log: Removing a redundant, but harmless, %s; NFC. Modified: cfe/trunk/test/Modules/ExtDebugInfo.cpp Modified: cfe/trunk/test/Modules/ExtDebugInfo.cpp URL:

[PATCH] D31126: Do not run tests for crash recovery if libstdc++ safe mode is enabled

2017-04-14 Thread Galina via Phabricator via cfe-commits
gkistanova accepted this revision. gkistanova added a comment. This revision is now accepted and ready to land. LGTM Thanks Galina https://reviews.llvm.org/D31126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30283: [ubsan] Reduce alignment checking of C++ object pointers

2017-04-14 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM. Comment at: test/CodeGenCXX/ubsan-suppress-checks.cpp:25 +// LAMBDA: and i64 %[[THISINT2]], 3, !nosanitize +// LAMBDA: call void

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D32081#727450, @benlangmuir wrote: > Rather than stick ranges into the diagnostic engine, I think it would be > cleaner to have the identifier have a method like `isEditorPlaceholder()` > that can be used to avoid situations like this in a

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

2017-04-14 Thread Daniel Berlin via Phabricator via cfe-commits
dberlin added a comment. In https://reviews.llvm.org/D31885#727499, @hfinkel wrote: > In https://reviews.llvm.org/D31885#727371, @efriedma wrote: > > > In https://reviews.llvm.org/D31885#727167, @hfinkel wrote: > > > > > I'm not sure this is the right way to do this; I suspect we're lumping > >

[PATCH] D32092: Attribute inline

2017-04-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D32092#727518, @zahiraam wrote: > Forgot to mention that this is for C only. CL doesn't compile this > declaration in a C++ context. > Please see: > https://godbolt.org/g/WRhyjL Oh, that's fun. It's not at all clear that this isn't

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

2017-04-14 Thread Daniel Berlin via Phabricator via cfe-commits
dberlin added a comment. In https://reviews.llvm.org/D31885#727529, @efriedma wrote: > > Such an effective type change must be more explicit than "i allocated > > typeless memory, and so i can do what i want with it". > > How can you change the effective type of malloc'ed memory in C, if

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D32081#727511, @arphaman wrote: > In https://reviews.llvm.org/D32081#727450, @benlangmuir wrote: > > > Rather than stick ranges into the diagnostic engine, I think it would be > > cleaner to have the identifier have a method like

Re: r300295 - [docs] UBSan: Mention that print_stacktrace=1 is unsupported on Darwin

2017-04-14 Thread Kuba Mracek via cfe-commits
What exactly is wrong with the fast unwinder? It's used in ASan and TSan and besides not knowing about inlined frames, it works great. But we're almost always dealing with code that has frame pointers (and the sanitizer runtimes themselves are built with frame pointers). Kuba > On 13 Apr

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

2017-04-14 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. In https://reviews.llvm.org/D31885#727167, @hfinkel wrote: > I'm not sure this is the right way to do this; I suspect we're lumping > together a bunch of different bugs: > > 1. vector types need to have tbaa which makes them alias with their element > types [to be

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

2017-04-14 Thread Daniel Berlin via Phabricator via cfe-commits
dberlin added a comment. In https://reviews.llvm.org/D31885#727370, @dberlin wrote: > In https://reviews.llvm.org/D31885#727352, @hfinkel wrote: > > > > I'm not sure about the solution to #2, because i thought there were very > > > specific points in time at which the effective type could

[PATCH] D31440: PR32382: Adapt to LLVM changes in DIExpression.

2017-04-14 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl updated this revision to Diff 95318. aprantl edited the summary of this revision. Herald added a subscriber: nhaehnle. https://reviews.llvm.org/D31440 Files: lib/CodeGen/CGDebugInfo.cpp test/CodeGen/debug-info-vla.c test/CodeGenCXX/debug-info.cpp

[PATCH] D32092: Attribute inline

2017-04-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:869 def GNUInline : InheritableAttr { - let Spellings = [GCC<"gnu_inline">]; + let Spellings = [GCC<"gnu_inline">, Declspec<"inline">]; let Subjects = SubjectList<[Function]>; I

[PATCH] D32092: Attribute inline

2017-04-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D32092#727507, @zahiraam wrote: > ksh-3.2$ cat test3.c > static void __declspec(inline) foo() { > } > > int main() > { > > foo(); > > } > > ksh-3.2$ cl test3.c > Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64

[PATCH] D31757: [clang-tidy] Add a clang-tidy check for possible inefficient vector operations

2017-04-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 95338. hokein marked 2 inline comments as done. hokein added a comment. Address remaining comments. https://reviews.llvm.org/D31757 Files: clang-tidy/performance/CMakeLists.txt clang-tidy/performance/InefficientVectorOperationCheck.cpp

[PATCH] D27546: [ASTReader] Sort RawComments before merging

2017-04-14 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. > Does this cause us to deserialize the SLocEntry for every FileID referenced > by a RawComment? That would seem pretty bad. I don't recall because It's been a while, but I'm gonna take a look and get back to you. Thanks https://reviews.llvm.org/D27546

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

2017-04-14 Thread Daniel Berlin via Phabricator via cfe-commits
dberlin added a comment. In https://reviews.llvm.org/D31885#727519, @dberlin wrote: > In https://reviews.llvm.org/D31885#727499, @hfinkel wrote: > > > In https://reviews.llvm.org/D31885#727371, @efriedma wrote: > > > > > In https://reviews.llvm.org/D31885#727167, @hfinkel wrote: > > > > > > >

[PATCH] D32092: Attribute inline

2017-04-14 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. Yes I did compare "inline" with "declspec(inline)" and not with "__attribute((gnu_inline))" and didn't test it whit different specifiers. I can do that. If behavior is different we probably have to add an additional attribute? https://reviews.llvm.org/D32092

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 95348. arphaman marked an inline comment as done. arphaman added a comment. - Don't use the diagnostic engine suppression ranges, but rely on changes to parser/sema for diagnostic suppression. - Rename the compiler flag to '-fallow-editor-placeholders'.

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

2017-04-14 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > Such an effective type change must be more explicit than "i allocated > typeless memory, and so i can do what i want with it". How can you change the effective type of malloc'ed memory in C, if storing a value of a new type doesn't have any effect? memset? A new C

[PATCH] D32092: Attribute inline

2017-04-14 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. Pushed the submit too fast ... Before I submitted this review, I have done some experiments and inline and declspec(inline) have the same behavior. Compiling with /Ob0 disables inlining. With -O1 or -O2, inline happens. https://reviews.llvm.org/D32092

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. It's more about handling all of the cases, e.g. the completion results for declaration patterns with placeholders, as those can't be caught with a check at an expression/typename level. I guess then I can catch all of the most common cases now and we can improve the

[PATCH] D32092: Attribute inline

2017-04-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D32092#727559, @zahiraam wrote: > Yes I did compare "inline" with "declspec(inline)" and not with > "__attribute((gnu_inline))" and didn't test it whit different specifiers. I > can do that. > If behavior is different we probably