r330927 - Make test more platform neutral

2018-04-26 Thread Serge Pavlov via cfe-commits
Author: sepavloff Date: Thu Apr 26 01:08:25 2018 New Revision: 330927 URL: http://llvm.org/viewvc/llvm-project?rev=330927&view=rev Log: Make test more platform neutral Modified: cfe/trunk/test/Driver/config-file4.c Modified: cfe/trunk/test/Driver/config-file4.c URL: http://llvm.org/viewvc/l

[PATCH] D46052: GNUstep Objective-C ABI version 2

2018-04-26 Thread David Chisnall via Phabricator via cfe-commits
theraven added a comment. In https://reviews.llvm.org/D46052#1078597, @rjmccall wrote: > Are you asking for a code review or a design review of the ABI? I don't think a design review is appropriate here, I am asking for a code review. > The second would be much easier to do from a design docu

[PATCH] D46081: [analyzer] Expand conversion check to check more expressions for overflow and underflow

2018-04-26 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. Looks reasonable. Have you tried on any large codebases? You relax two guards, so I would be wary of explosion in false positives. Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:77 if (Opc == BO_Assign) { - LossOfSign

[PATCH] D41537: Optionally add code completion results for arrow instead of dot

2018-04-26 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 144076. yvvan added a comment. Wrapper around FIxItHint is removed, other review comments are addressed . https://reviews.llvm.org/D41537 Files: include/clang-c/Index.h include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/CodeCompleteConsumer.h

[PATCH] D46108: [ARM] Add __ARM_FEATURE_DOTPROD pre-defined macro

2018-04-26 Thread Oliver Stannard via Phabricator via cfe-commits
olista01 created this revision. olista01 added reviewers: rengolin, SjoerdMeijer, flyingforyou. Herald added a reviewer: javed.absar. Herald added subscribers: llvm-commits, chrib, kristof.beyls. This adds a pre-defined macro to test if the compiler has support for the v8.2-A dot rpoduct intrinsi

[PATCH] D46000: [AST] Added a helper to extract a user-friendly text of a comment.

2018-04-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 144083. ilya-biryukov marked 2 inline comments as done. ilya-biryukov added a comment. - Remove tryLexCommands(), call into helper that parses commands directly - Addressed other review comments Repository: rC Clang https://reviews.llvm.org/D46000

[PATCH] D46109: [ARM, AArch64] Add intrinsics for dot product instructions

2018-04-26 Thread Oliver Stannard via Phabricator via cfe-commits
olista01 created this revision. olista01 added reviewers: rengolin, SjoerdMeijer, flyingforyou. Herald added a reviewer: javed.absar. Herald added subscribers: llvm-commits, chrib, kristof.beyls. The ACLE spec which describes these intrinsics hasn't been published yet, but this is based on the fi

[PATCH] D46000: [AST] Added a helper to extract a user-friendly text of a comment.

2018-04-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked 4 inline comments as done. ilya-biryukov added inline comments. Comment at: include/clang/AST/RawCommentList.h:118 + /// // Parts of it might be indented. + /// /* The comments styles might be mixed. */ + /// into ioeric wrote:

[PATCH] D46050: [Frontend] Avoid running plugins during code completion parse

2018-04-26 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. In https://reviews.llvm.org/D46050#1078112, @thakis wrote: > Seems reasonable; can you add a test for this (maybe somewhere in > clang/test/Frontend/plugin*)? Done. In https://reviews.llvm.org/D46050#1078155, @john.brawn wrote: > I know very little about how code complet

[PATCH] D46050: [Frontend] Avoid running plugins during code completion parse

2018-04-26 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 144084. nik added a comment. Added a test and clarified scenario in commit message. Repository: rC Clang https://reviews.llvm.org/D46050 Files: lib/Frontend/FrontendAction.cpp test/Frontend/plugins.c Index: test/Frontend/plugins.c =

[PATCH] D46081: [analyzer] Expand conversion check to check more expressions for overflow and underflow

2018-04-26 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. While I understand extending the analyzer to cover more is a good approach, there is `-Wconversion` which seemingly covers this -- or at least the trivial case(?): #include #include void foo(unsigned x) { printf("%u\n", x); } int main() {

[PATCH] D46050: [Frontend] Avoid running plugins during code completion parse

2018-04-26 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added inline comments. Comment at: test/Frontend/plugins.c:7 + +// RUN: c-index-test -code-completion-at=%s:6:1 -load %llvmshlibdir/PrintFunctionNames%pluginext -add-plugin print-fns %s | FileCheck -check-prefix=CHECK-COMPLETION-WITHOUT-PLUGINS %s +// REQUIRES: plugins, ex

[PATCH] D41537: Optionally add code completion results for arrow instead of dot

2018-04-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Could you upload the patch with full context? Comment at: include/clang/Sema/CodeCompleteConsumer.h:704 +CXAvailabilityKind Availability, +const std::vector &Corrections) : Allocator(Allocator

[PATCH] D46112: Allow _Atomic to be specified on incomplete types

2018-04-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added a reviewer: rsmith. The C standard does not prohibit the _Atomic specifier on incomplete types, which turns out to be sometimes useful. This addresses PR37237. Note that C++ still requires checking if the type is complete in order to sup

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-26 Thread Erik Verbruggen via Phabricator via cfe-commits
erikjv added a comment. About the timing testing: I'm not very familiar with boost, but it probably has a library that's using templates more than either LLVM or Qt. Maybe you can test one of those too? LGTM otherwise. Repository: rC Clang https://reviews.llvm.org/D45815 ___

[PATCH] D44684: [mips] Improve handling of -fno-[pic/PIC] option

2018-04-26 Thread Aleksandar Beserminji via Phabricator via cfe-commits
abeserminji updated this revision to Diff 144092. abeserminji added a comment. Comments resolved. Repository: rL LLVM https://reviews.llvm.org/D44684 Files: include/clang/Basic/DiagnosticDriverKinds.td lib/Driver/ToolChains/Arch/Mips.cpp lib/Driver/ToolChains/CommonArgs.cpp test/Driv

[PATCH] D46108: [ARM] Add __ARM_FEATURE_DOTPROD pre-defined macro

2018-04-26 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer accepted this revision. SjoerdMeijer added a comment. This revision is now accepted and ready to land. Looks like a straight forward fix/addition to me. Comment at: lib/Basic/Targets/ARM.cpp:737 + if (DotProd) +Builder.defineMacro("__ARM_FEATURE_DOTPROD", "1

[PATCH] D46109: [ARM, AArch64] Add intrinsics for dot product instructions

2018-04-26 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer accepted this revision. SjoerdMeijer added a comment. This revision is now accepted and ready to land. I think this looks OK. Comment at: include/clang/Basic/arm_neon.td:1587 +// v8.2-A dot product instructions +let ArchGuard = "defined(__ARM_FEATURE_DOTPROD)" in {

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov requested changes to this revision. ilya-biryukov added a comment. This revision now requires changes to proceed. > OK, I've rechecked this change. I don't see any obvious mistake :) I think I got to the bottom of it. We didn't expect a big win, because we expect people to not put

[PATCH] D45212: [HIP] Let CUDA toolchain support HIP language mode and amdgpu

2018-04-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 14 inline comments as done. yaxunl added a comment. ping https://reviews.llvm.org/D45212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 144098. svenvh edited the summary of this revision. svenvh added a comment. Updated patch to reject any thread storage class specifier, not just `thread_local`. Also mark the OpenCL access qualifiers as reserved keywords as per OpenCL C++ 1.0 s2.2, and add a

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: include/clang/Basic/TokenKinds.def:255 +// KEYNOOPENCL - This is a keyword that is not supported in OpenCL C +// nor in OpenCL C++. // KEYALTIVEC - This is a keyword in AltiVec rjmccall wrote: > `KE

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

2018-04-26 Thread Peter Szecsi via Phabricator via cfe-commits
szepet marked an inline comment as done. szepet added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:1569 +FirstDeclMatcher().match(*TB, Pattern); +if (!FromDSDRE) + return; martong wrote: > I think, this `if` would be needed only

[PATCH] D46115: [ASTImporter] properly import SrcLoc of Attr

2018-04-26 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl created this revision. r.stahl added reviewers: NoQ, dcoughlin, xazax.hun, george.karpenkov. Herald added subscribers: cfe-commits, martong, a.sidorin, rnkovacs. The ASTImporter was failing to import the SourceLocation field of Attrs. Repository: rC Clang https://reviews.llvm.org/D461

[PATCH] D46115: [ASTImporter] properly import SrcLoc of Attr

2018-04-26 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added a comment. This is unfinished. Posting to make you aware of the issue. There are other occurances of imported attrs without importing the srcloc in: - VisitIndirectFieldDecl - VisitAttributedStmt So I was thinking this would suggest to add a public API `ASTImporter::Import(Attr *

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

2018-04-26 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin requested changes to this revision. a.sidorin added inline comments. This revision now requires changes to proceed. Comment at: unittests/AST/ASTImporterTest.cpp:1569 +FirstDeclMatcher().match(*TB, Pattern); +if (!FromDSDRE) + return; s

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-04-26 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: include/clang/Format/Format.h:891 + /// \endcode + bool BreakBeforeLambdaBody; + I'd just make that default for Allman style. Comment at: lib/Format/TokenAnnotator.cpp:2844 if (isAllmanBrace(Left)

[PATCH] D46024: [clang-format] Add SpaceBeforeCpp11BracedList option.

2018-04-26 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Is this written down somewhere? https://webkit.org/code-style-guidelines/ doesn't seem to mention it. Repository: rC Clang https://reviews.llvm.org/D46024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D44684: [mips] Improve handling of -fno-[pic/PIC] option

2018-04-26 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added inline comments. Comment at: include/clang/Basic/DiagnosticDriverKinds.td:340 + "ignoring '%0' option as it cannot be used with " + "explicit use of -mabicalls and the N64 ABI">, InGroup; Use the %select{optionA|optionB|..|optionZ}$NUM operator

[PATCH] D32859: [Analyzer] Iterator Checker - Part 5: Move Assignment of Containers

2018-04-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 144106. baloghadamsoftware added a comment. Herald added a reviewer: george.karpenkov. One test failed after rebased to the current master branch. Depending on the internal implementation of the iterator and the move operation of the container it

[PATCH] D46000: [AST] Added a helper to extract a user-friendly text of a comment.

2018-04-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Looks good. We still need tests though :) Comment at: lib/AST/RawCommentList.cpp:376 +SourceMgr.getSpellingColumnNumber(Tok.getLocation(), &LocInvalid); +if (LocInvalid) + TokColumn = 0; This is a bit confusing... Could

[PATCH] D46081: [analyzer] Expand conversion check to check more expressions for overflow and underflow

2018-04-26 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > While I understand extending the analyzer to cover more is a good approach, > there is -Wconversion which seemingly covers this -- or at least the trivial > case(?): Yes, but it won't catch something like this, which is more interesting: void g(unsigned); void f(

[PATCH] D46081: [analyzer] Expand conversion check to check more expressions for overflow and underflow

2018-04-26 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added inline comments. Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:77 if (Opc == BO_Assign) { - LossOfSign = isLossOfSign(Cast, C); - LossOfPrecision = isLossOfPrecision(Cast, Cast->getType(), C); + if (!B->getRHS()->isIntegerConstant

[PATCH] D32860: [Analyzer] Iterator Checker - Part 6: Mismatched iterator checker for constructors and comparisons

2018-04-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 144110. baloghadamsoftware added a comment. Herald added a reviewer: george.karpenkov. Rebased to Part 5. https://reviews.llvm.org/D32860 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Analysis/mismatched-iterator.cpp Index: tes

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2018-04-26 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 144112. https://reviews.llvm.org/D44387 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/CodeGen/CGBuiltin.cpp lib/Headers/CMakeLists.txt lib/Headers/cpuid.h lib/H

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2018-04-26 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 144113. https://reviews.llvm.org/D44387 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/CodeGen/CGBuiltin.cpp lib/Headers/CMakeLists.txt lib/Headers/cpuid.h lib/H

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-04-26 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a subscriber: rsmith. mikhail.ramalho added a comment. Hi, > Or is the that whenever there's a `#line` directive we get into a > "virtual" file that's not registered in the `SourceManager`? The virtual file is actually registered in the SourceManager but the FileEntry for

[PATCH] D46019: [ASTImporter] Fix isa cast assert

2018-04-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Guys, I still don't have commit rights, could you please help me with the commit? (I think one more good quality patch and then I could request commit rights for myself ...) Repository: rC Clang https://reviews.llvm.org/D46019

[PATCH] D46081: [analyzer] Expand conversion check to check more expressions for overflow and underflow

2018-04-26 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > Have you tried on any large codebases? This check is not available to the user yet. I can move it to core if you want. Repository: rC Clang https://reviews.llvm.org/D46081 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-04-26 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 144119. Szelethus added a comment. Fixes according to inline comments. https://reviews.llvm.org/D45532 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/CtorUninitializedM

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-04-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added subscribers: sammccall, ioeric, hokein, bkramer. ilya-biryukov added a comment. In https://reviews.llvm.org/D42966#1079438, @mikhail.ramalho wrote: > The virtual file is actually registered in the SourceManager but the > FileEntry for it is NULL (USRGeneration.cpp:33), which

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-04-26 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 3 inline comments as done. Szelethus added a comment. By the way, thank you all for taking the time to review my code! Comment at: lib/StaticAnalyzer/Checkers/CtorUninitializedMemberChecker.cpp:306 + + const RecordDecl *RD = + R->getValueType()->getAs()->

r330946 - Add getDeserializationListener to ASTReader

2018-04-26 Thread Yuka Takahashi via cfe-commits
Author: yamaguchi Date: Thu Apr 26 08:09:13 2018 New Revision: 330946 URL: http://llvm.org/viewvc/llvm-project?rev=330946&view=rev Log: Add getDeserializationListener to ASTReader Summary: We need to know if ASTReader already has a DeserializationListner or not, and this also helps to create a mu

[PATCH] D45921: Add getDeserializationListener to ASTReader

2018-04-26 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330946: Add getDeserializationListener to ASTReader (authored by yamaguchi, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D45921?vs=143441&id

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Basic/TokenKinds.def:255 +// KEYNOOPENCL - This is a keyword that is not supported in OpenCL C +// nor in OpenCL C++. // KEYALTIVEC - This is a keyword in AltiVec svenvh wrote: > rjm

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2018-04-26 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I didn't see an answer to the inline assembly question. Comment at: lib/Headers/pconfigintrin.h:31 + +#define MKTME_KEY_PROGRAM 0x0001 + craig.topper wrote: > This doesn't match the name used by gcc. It also needs to start with

Re: [PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-04-26 Thread Mikhail Ramalho via cfe-commits
Hi, > Or is the that whenever there's a `#line` directive we get into a > "virtual" file that's not registered in the `SourceManager`? > > The virtual file is actually registered in the SourceManager but the FileEntry for it is NULL (USRGeneration.cpp:33), which forces printLoc to return true (US

[PATCH] D45720: [X86] Lowering PACK*S (pack with saturation) intrinsics to native IR (clang side)

2018-04-26 Thread Mikhail Dvoretckii via Phabricator via cfe-commits
mike.dvoretsky updated this revision to Diff 144126. mike.dvoretsky added a comment. Changed the shuffle mask emission code to match https://reviews.llvm.org/D45721. https://reviews.llvm.org/D45720 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/avx2-builtins.c clang/test/CodeGe

[PATCH] D46081: [analyzer] Expand conversion check to check more expressions for overflow and underflow

2018-04-26 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. So moving to core will require explicit casts in some of the tests, especially for things like: `memcpy(a262.s1, input, -1)`. Or this could be moved to another section instead of core. In https://reviews.llvm.org/D45532 there is talk of adding a bugprone section. I thin

[PATCH] D46052: GNUstep Objective-C ABI version 2

2018-04-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGObjCGNU.cpp:961 + GV->setSection(Section); +return GV; + } I'd encourage you to use ConstantBuilder whenever you would want to use this. Comment at: lib/CodeGen/CGObjCGNU.cpp:9

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-26 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya abandoned this revision. hiraditya added a comment. It appears this warning may not be always useful because there will be false positives. https://reviews.llvm.org/D45601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[libcxx] r330955 - Move old test into test/libcxx, and implement new version of test for ostreambuf_iterator::failed. Fixes PR#37245. Thanks to Billy O'Neill for the bug report.

2018-04-26 Thread Marshall Clow via cfe-commits
Author: marshall Date: Thu Apr 26 09:16:45 2018 New Revision: 330955 URL: http://llvm.org/viewvc/llvm-project?rev=330955&view=rev Log: Move old test into test/libcxx, and implement new version of test for ostreambuf_iterator::failed. Fixes PR#37245. Thanks to Billy O'Neill for the bug report. A

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: lib/Parse/ParseStmtAsm.cpp:696 +return StmtError(); + } + rjmccall wrote: > You might consider parsing the statement normally and then just diagnosing > after the fact, maybe in Sema. You'd have to add the check in

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 144138. svenvh added a comment. Reject goto in `Sema::ActOnIndirectGotoStmt` too, and add a test for indirect goto. https://reviews.llvm.org/D46022 Files: include/clang/Basic/DiagnosticCommonKinds.td include/clang/Basic/DiagnosticParseKinds.td include

[PATCH] D46131: Add Microsoft Mangling for OpenCL Half Type

2018-04-26 Thread Vince Bridgers via Phabricator via cfe-commits
vbridgers created this revision. vbridgers added reviewers: rnk, Anastasia, erichkeane. vbridgers added a project: clang. Herald added subscribers: cfe-commits, yaxunl. Half-type mangling is accomplished following the method introduced by Erich Keane for mangling _Float16. Updated the half.cl LIT

[PATCH] D46132: [X86] Make __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32 only available on 32-bit targets.

2018-04-26 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: rnk, echristo, chandlerc. These builtins can't be handled by the backend on 64-bit targets. So error up front instead of throwing an isel error. Fixes PR37225 Repository: rC Clang https://reviews.llvm.org/D46132 Files: inc

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Parse/ParseStmtAsm.cpp:696 +return StmtError(); + } + svenvh wrote: > rjmccall wrote: > > You might consider parsing the statement normally and then just diagnosing > > after the fact, maybe in Sema. You'd ha

[PATCH] D46024: [clang-format] Add SpaceBeforeCpp11BracedList option.

2018-04-26 Thread Ross Kirsling via Phabricator via cfe-commits
rkirsling added a comment. In https://reviews.llvm.org/D46024#1079390, @klimek wrote: > Is this written down somewhere? https://webkit.org/code-style-guidelines/ > doesn't seem to mention it. I agree that it really ought to be mentioned there—I'll try to bring that up with the original author

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: lib/Parse/ParseStmtAsm.cpp:696 +return StmtError(); + } + rjmccall wrote: > svenvh wrote: > > rjmccall wrote: > > > You might consider parsing the statement normally and then just > > > diagnosing after the fact, ma

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 144154. Anastasia added a comment. - Renamed test; - Reformatted; - Added constant in StringLiteral creation. https://reviews.llvm.org/D46049 Files: lib/AST/Expr.cpp lib/Sema/SemaExpr.cpp test/SemaOpenCL/predefined-expr.cl Index: test/SemaOpenCL/p

[PATCH] D46131: Add Microsoft Mangling for OpenCL Half Type

2018-04-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D46131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-26 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added inline comments. This revision is now accepted and ready to land. Comment at: lib/Sema/SemaExpr.cpp:3056 + if (LangOpts.OpenCL) +ResTy = Context.getAddrSpaceQualType(ResTy, LangAS::opencl_constant); ResTy = Context.get

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Sanjay Patel via Phabricator via cfe-commits
spatel created this revision. spatel added reviewers: jgorbe, chandlerc, scanon, hans, echristo. Herald added a subscriber: mcrosier. As discussed in the post-commit thread for: https://reviews.llvm.org/rL330437 ( http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20180423/545906.html ) We

[PATCH] D45917: Pass -Oz/-Os along to the backend

2018-04-26 Thread Jessica Paquette via Phabricator via cfe-commits
paquette abandoned this revision. paquette added a comment. We decided it'd be better to just use function attributes for the outliner, so I'm abandoning this. https://reviews.llvm.org/D45917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Parse/ParseStmtAsm.cpp:696 +return StmtError(); + } + svenvh wrote: > rjmccall wrote: > > svenvh wrote: > > > rjmccall wrote: > > > > You might consider parsing the statement normally and then just > > > > dia

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/CodeGen/no-junk-ftrunc.c:1 +// RUN: %clang_cc1 -S -ffp-cast-overflow-workaround %s -emit-llvm -o - | FileCheck %s + For a good measure, i'd add one more `RUN` line to test that it is currently the default. (Yes

[PATCH] D45884: [Sema] Fix parsing of anonymous union in language linkage specification

2018-04-26 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai accepted this revision. vsapsai added inline comments. This revision is now accepted and ready to land. Comment at: Sema/SemaDecl.cpp:4651-4653 + + DeclContext *OwnerScope = Owner->getRedeclContext(); + I think the code style favours avoiding excessi

[PATCH] D46139: Add template type and value parameter metadata nodes to template variable specializations.

2018-04-26 Thread Matthew Voss via Phabricator via cfe-commits
ormris created this revision. ormris added reviewers: dblaikie, probinson, aprantl, JDevlieghere, clayborg. Depends on LLVM patch: https://reviews.llvm.org/D46138 Resolves PR22119 Repository: rC Clang https://reviews.llvm.org/D46139 Files: lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGDebug

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExpr.cpp:3059 /*IndexTypeQuals*/ 0); SL = StringLiteral::Create(Context, Str, StringLiteral::Ascii, /*Pascal*/ false, ResTy, Loc); --

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added inline comments. Comment at: test/CodeGen/no-junk-ftrunc.c:1 +// RUN: %clang_cc1 -S -ffp-cast-overflow-workaround %s -emit-llvm -o - | FileCheck %s + lebedev.ri wrote: > For a good measure, i'd add one more `RUN` line to test that it is currently >

[PATCH] D46139: Add template type and value parameter metadata nodes to template variable specializations.

2018-04-26 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:3023 + templateParameters = parameterNodes.get(); + // Since we emit declarations (DW_AT_members) for static members, place the Naively it looks like it should be possible to put the loc

[PATCH] D46139: Add template type and value parameter metadata nodes to template variable specializations.

2018-04-26 Thread Matthew Voss via Phabricator via cfe-commits
ormris added a comment. Thanks for spotting that @probinson. Will update. Repository: rC Clang https://reviews.llvm.org/D46139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46112: Allow _Atomic to be specified on incomplete types

2018-04-26 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. This generally makes sense. Need some tests to make sure we emit an appropriate error if you try to actually use atomic operators (load/store) or intrinsics (__atomic_is_lock_free etc.) with an incomplete type. And a test that code generation emits something appropri

[PATCH] D46132: [X86] Make __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32 only available on 32-bit targets.

2018-04-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Looks good. Repository: rC Clang https://reviews.llvm.org/D46132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Jorge Gorbe via Phabricator via cfe-commits
jgorbe added a comment. Can't comment much on the patch itself (I'm still not very familiar with the codebase, I'll leave that to the other reviewers), but thanks a lot for responding so quickly! :) https://reviews.llvm.org/D46135 ___ cfe-commits

[PATCH] D46143: [clang-format/ObjC] Use getIdentifierInfo() instead of tok::identifier

2018-04-26 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: djasper, jolesiak. Herald added subscribers: cfe-commits, klimek. Previously, we checked tokens for `tok::identifier` to see if they were identifiers inside an Objective-C selector. However, this missed C++ keywords like `new` and `d

r330987 - [X86] Make __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32 only available on 32-bit targets.

2018-04-26 Thread Craig Topper via cfe-commits
Author: ctopper Date: Thu Apr 26 13:14:46 2018 New Revision: 330987 URL: http://llvm.org/viewvc/llvm-project?rev=330987&view=rev Log: [X86] Make __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32 only available on 32-bit targets. These builtins can't be handled by the backend on 64

[PATCH] D46132: [X86] Make __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32 only available on 32-bit targets.

2018-04-26 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330987: [X86] Make __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32… (authored by ctopper, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.l

[PATCH] D46139: Add template type and value parameter metadata nodes to template variable specializations.

2018-04-26 Thread Matthew Voss via Phabricator via cfe-commits
ormris abandoned this revision. ormris added a comment. After some further inspection, support for the LLVM side of patch needs a few significant additions. Abandoning this revision. Repository: rC Clang https://reviews.llvm.org/D46139 ___ cfe-c

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added inline comments. Comment at: docs/UsersManual.rst:1260-1265 + Enable or disable a code generation optimization that may convert a + cast of a floating-point value to integer and back to floating-point + into the equivalent of the math libary's 'trunc()' func

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-26 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/AST/Expr.cpp:870 + if (C.getLangOpts().OpenCL && Ty.getAddressSpace() == LangAS::Default) +Ty = C.getAddrSpaceQualType(Ty, LangAS::opencl_constant); + As `Ty` is passed by value, shouldn't we accept only data loca

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added inline comments. Comment at: docs/UsersManual.rst:1260-1265 + Enable or disable a code generation optimization that may convert a + cast of a floating-point value to integer and back to floating-point + into the equivalent of the math libary's 'trunc()' functio

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added inline comments. Comment at: docs/UsersManual.rst:1260-1265 + Enable or disable a code generation optimization that may convert a + cast of a floating-point value to integer and back to floating-point + into the equivalent of the math libary's 'trunc()' func

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Steve Canon via Phabricator via cfe-commits
scanon added a comment. I like Chandler's wording. Something like: "... this flag will attempt to cause " https://reviews.llvm.org/D46135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D46081: [analyzer] Expand conversion check to check more expressions for overflow and underflow

2018-04-26 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 updated this revision to Diff 144202. pfultz2 added a comment. So I ran this on clang/llvm code base and fixed some false positives. https://reviews.llvm.org/D46081 Files: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp test/Analysis/conversion.c test/Analysis/conversion.cpp In

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Sanjay Patel via Phabricator via cfe-commits
spatel updated this revision to Diff 144200. spatel added a comment. Patch updated: 1. Improve the documentation language - more suggestions welcome! 2. Change the default setting so the work-around is 'off' (ie, by default assume source is compliant and optimize accordingly). 3. Remove the 'no'

r330997 - [x86] Revert r330322 (& r330323): Lowering x86 adds/addus/subs/subus intrinsics

2018-04-26 Thread Chandler Carruth via cfe-commits
Author: chandlerc Date: Thu Apr 26 14:46:01 2018 New Revision: 330997 URL: http://llvm.org/viewvc/llvm-project?rev=330997&view=rev Log: [x86] Revert r330322 (& r330323): Lowering x86 adds/addus/subs/subus intrinsics The LLVM commit introduces a crash in LLVM's instruction selection. I filed http

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added a comment. In https://reviews.llvm.org/D46135#1080108, @spatel wrote: > 3. Remove the 'no' version of the flag. Given the change in the default, this > seems more natural to me, and it simplifies the patch/tests...but I might > have been too pessimistic before and this is too op

[PATCH] D46115: [ASTImporter] properly import SrcLoc of Attr

2018-04-26 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a reviewer: a.sidorin. NoQ added a comment. +Alexey because he's the `ASTImporter` guy. Repository: rC Clang https://reviews.llvm.org/D46115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D46146: [analyzer] pr37152: Fix operator delete[] array-type-sub-expression handling.

2018-04-26 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs, baloghadamsoftware. When operator `delete[]` receives a sub-expression of array type, it destroys the array correctly. Even if it's multi-dim

[PATCH] D46146: [analyzer] pr37152: Fix operator delete[] array-type-sub-expression handling.

2018-04-26 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:1089-1091 +// Yes, it may even be a multi-dimensional array. +while (const auto *AT = getContext().getAsArrayType(DTy)) + DTy = AT->getElementType(); Maybe add a FIXME t

[PATCH] D46148: [CUDA] Added -f[no-]cuda-short-ptr option

2018-04-26 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added a reviewer: jlebar. Herald added subscribers: bixia, sanjoy, jholewinski. The option enables use of 32-bit pointers for accessing const/local/shared memory. The feature is disabled by default. https://reviews.llvm.org/D46148 Files: clang/include/clang/Driv

[libcxx] r330999 - [libcxx] [test] Remove non-portable assertions from filebuf tests

2018-04-26 Thread Billy Robert O'Neal III via cfe-commits
Author: bion Date: Thu Apr 26 15:18:33 2018 New Revision: 330999 URL: http://llvm.org/viewvc/llvm-project?rev=330999&view=rev Log: [libcxx] [test] Remove non-portable assertions from filebuf tests seekoff.pass.cpp: libc++'s tests are asserting things about the buffer passed to pubsetbuf. [filebu

[PATCH] D46148: [CUDA] Added -f[no-]cuda-short-ptr option

2018-04-26 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 144216. tra added a comment. Removed debug printout. https://reviews.llvm.org/D46148 Files: clang/include/clang/Driver/Options.td clang/lib/Basic/Targets/NVPTX.cpp clang/lib/Driver/ToolChains/Cuda.cpp Index: clang/lib/Driver/ToolChains/Cuda.cpp

[PATCH] D45294: [libcxx] [test] Remove non-portable assertions from filebuf tests

2018-04-26 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal closed this revision. BillyONeal added a comment. D:\msvc\src\qa\VC\Libs\libcxx\upstream>git svn dcommit Committing to https://llvm.org/svn/llvm-project/libcxx/trunk ... Use of uninitialized value $rec in scalar chomp at /mingw64/share/perl5/Git.pm line 557, <$fh> chunk 4. Authenticati

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Sanjay Patel via Phabricator via cfe-commits
spatel updated this revision to Diff 144226. spatel added a comment. Patch upated: 1. Restore the 'no' option to allow toggling. 2. Add a RUN to the codegen test to show that the function attribute is not appended by default. https://reviews.llvm.org/D46135 Files: docs/UsersManual.rst inc

[PATCH] D46146: [analyzer] pr37152: Fix operator delete[] array-type-sub-expression handling.

2018-04-26 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:1089-1091 +// Yes, it may even be a multi-dimensional array. +while (const auto *AT = getContext().getAsArrayType(DTy)) + DTy = AT->getElementType(); alexfh wrote: > Maybe

[PATCH] D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor

2018-04-26 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 144231. ahatanak marked an inline comment as done. ahatanak added a comment. Rename variable to something OldCleanupScopeDepth. Repository: rC Clang https://reviews.llvm.org/D45382 Files: lib/CodeGen/CGCall.cpp lib/CodeGen/CGCleanup.cpp lib/CodeGe

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc accepted this revision. chandlerc added a comment. This revision is now accepted and ready to land. LGTM, thanks so much! https://reviews.llvm.org/D46135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

2018-04-26 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal added subscribers: STL_MSFT, BillyONeal. BillyONeal added a comment. @mclow.lists @STL_MSFT Why did tests for this this go into std? [reentrancy]/1 says this isn't required to work. Moreover, assignments in the dtor like this *can't* work in the general case because they would try to

  1   2   >