[PATCH] D47849: [OpenMP][Clang][NVPTX] Enable math functions called in an OpenMP NVPTX target device region to be resolved as device-native function calls

2018-08-08 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D47849#1192493, @gtbercea wrote: > @Hahnfeld do you get the same error if you compile with clang++ instead of > clang? Yes, with both trunk and this patch applied. It's the same header after all... Repository: rC Clang https://reviews.

[PATCH] D50455: Continue emitting diagnostics after a fatal error

2018-08-08 Thread Dmitry via Phabricator via cfe-commits
Dmitry.Kozhevnikov created this revision. Dmitry.Kozhevnikov added reviewers: ilya-biryukov, sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous. By default, diagnostics are suppressed after a fatal error. Some fatal errors (notably, "file not found" for include directive) are com

[PATCH] D50413: [libunwind][include] Add some missing definitions to .

2018-08-08 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a subscriber: joerg. krytarowski added a comment. In https://reviews.llvm.org/D50413#1192475, @cdavis5x wrote: > In https://reviews.llvm.org/D50413#1191726, @krytarowski wrote: > > > NetBSD uses `typedef void *_Unwind_Ptr;` unconditionally in its > > ``... if that has to be mat

[PATCH] D40526: [WebAssembly] Change size_t to `unsigned long`

2018-08-08 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. I'm running into an issue with an internal codebase that assumes that size_t is equivalent to either int32_t or int64_t which this change invalidates. After this change we have: size_t -> long int32_t -> int int64_t -> ling long int. e.g.: #include #include

[PATCH] D40526: [WebAssembly] Change size_t to `unsigned long`

2018-08-08 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Should we change int32_t as well? Or does the above code just need fixing? I'm a little concerned because this code is very portable which implies that WebAssembly might be doing something unusual here. Repository: rC Clang https://reviews.llvm.org/D40526 _

[PATCH] D50446: [clangd] Record the currently active file in context for codeCompletion and findDefinitions.

2018-08-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 159746. ioeric marked 3 inline comments as done. ioeric added a comment. Herald added a subscriber: javed.absar. - Addressed review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50446 Files: clangd/TUScheduler.cpp clangd/TUSch

[PATCH] D50446: [clangd] Record the currently active file in context for codeCompletion and findDefinitions.

2018-08-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Ok, I am convinced :) Putting the context key into TUScheduler.cpp and exposing a static method to access it sound like a better idea afterall. Thanks for the suggestions! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50446 _

r339273 - CDDecl More automatic variable tail padding test

2018-08-08 Thread JF Bastien via cfe-commits
Author: jfb Date: Wed Aug 8 10:05:17 2018 New Revision: 339273 URL: http://llvm.org/viewvc/llvm-project?rev=339273&view=rev Log: CDDecl More automatic variable tail padding test Test tail padded automatic variable at different width, because they encounter different codegen. Modified: cfe/

[PATCH] D50462: Try building complete AST after a fatal error was emitted if further diagnostics are expected

2018-08-08 Thread Dmitry via Phabricator via cfe-commits
Dmitry.Kozhevnikov created this revision. Dmitry.Kozhevnikov added reviewers: ilya-biryukov, sammccall, milianw. Herald added subscribers: cfe-commits, ioeric. Related to https://reviews.llvm.org/D50455 There is some code here and there that assume that no sane output is required if a fatal erro

[PATCH] D50455: Continue emitting diagnostics after a fatal error

2018-08-08 Thread Dmitry via Phabricator via cfe-commits
Dmitry.Kozhevnikov added a comment. See also https://reviews.llvm.org/D50462 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-08 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added inline comments. Comment at: lib/CodeGen/CGObjCGNU.cpp:3542 + allSelectors.push_back(entry.first); +std::sort(allSelectors.begin(), allSelectors.end()); Please use llvm::sort instead of std::sort. See https://llvm.org/docs/CodingStandards

[PATCH] D40526: [WebAssembly] Change size_t to `unsigned long`

2018-08-08 Thread Dan Gohman via Phabricator via cfe-commits
sunfish added a comment. Is this related to the issue reported in the thread here ? Repository: rC Clang https://reviews.llvm.org/D40526 ___ cfe-commits mailing list cfe-c

[PATCH] D50168: [Builtins] Implement __builtin_clrsb to be compatible with gcc

2018-08-08 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 159753. craig.topper added a comment. Use ctlz(zero_undef=false) and sub https://reviews.llvm.org/D50168 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp test/CodeGen/builtin_clrsb.c Index: test/CodeGen/builtin_clrsb.c

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-08-08 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I got some actual data. The way we package clang today, the extracted installation is 134.83M, and lib/clang/7.0.0/lib/darwin/* is 13M, so it's a 10% increase. It would be worth it to us to replace these with empty files if this change does land, but again, I'd rather not g

r339278 - AMDGPU: Fix enabling denormals by default on pre-VI targets

2018-08-08 Thread Matt Arsenault via cfe-commits
Author: arsenm Date: Wed Aug 8 10:48:37 2018 New Revision: 339278 URL: http://llvm.org/viewvc/llvm-project?rev=339278&view=rev Log: AMDGPU: Fix enabling denormals by default on pre-VI targets Fast FMAF is not a sufficient condition to enable denormals. Before VI, enabling denormals caused F32 in

[PATCH] D50376: AMDGPU: Fix enabling denormals by default on pre-VI targets

2018-08-08 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r339278 https://reviews.llvm.org/D50376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40526: [WebAssembly] Change size_t to `unsigned long`

2018-08-08 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In https://reviews.llvm.org/D40526#1192688, @sunfish wrote: > Is this related to the issue reported in the thread here > ? Ah yes, I'll follow up there. Repository: rC Clang https://reviews.l

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. Herald added a subscriber: cfe-commits. Fixes Bug: https://bugs.llvm.org/show_bug.cgi?id=27061 Repository: rC Clang https://reviews.llvm.org/D50467 Files: lib/Sema/SemaChecking.cpp test/SemaCXX/warn-float-conversion.cpp Index: test/SemaCXX/warn-flo

[PATCH] D40526: [WebAssembly] Change size_t to `unsigned long`

2018-08-08 Thread Alon Zakai via Phabricator via cfe-commits
azakai added subscribers: sunfish, jgravelle-google. azakai added a comment. This has also shown up in a game engine middleware codebase, so it may be a broader issue - people seem to assume size_t is one of the int*_t types. Repository: rC Clang https://reviews.llvm.org/D40526 ___

[PATCH] D41910: [Concepts] Constrained partial specializations and function overloads.

2018-08-08 Thread Saar Raz via Phabricator via cfe-commits
saar.raz updated this revision to Diff 159759. saar.raz added a comment. - Moved constraint checks to the end of FinishTemplateArgumentDeduction Repository: rC Clang https://reviews.llvm.org/D41910 Files: include/clang/AST/DeclTemplate.h include/clang/Basic/DiagnosticSemaKinds.td inclu

[PATCH] D50168: [Builtins] Implement __builtin_clrsb to be compatible with gcc

2018-08-08 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg https://reviews.llvm.org/D50168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 159763. nickdesaulniers added a comment. - rework ordering of conditionals to reduce indentation Repository: rC Clang https://reviews.llvm.org/D50467 Files: lib/Sema/SemaChecking.cpp test/SemaCXX/warn-float-conversion.cpp Index: test/SemaCXX

[PATCH] D48687: [clangd] Avoid duplicates in findDefinitions response

2018-08-08 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 159764. simark added a comment. Herald added a subscriber: arphaman. New version. I tried to share the code between this and SymbolCollector, but didn't find a good clean way. Do you have concrete suggestions on how to do this? Otherwise, would it be accepta

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/SemaChecking.cpp:10413-10416 + // If source is floating point but target is not. + if (!ResultBT->isFloatingPoint()) +return DiagnoseFloatingImpCast(S, E, E->getRHS()->getType(), +

[PATCH] D50152: [CodeGen] Merge equivalent block copy/helper functions

2018-08-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 159762. ahatanak added a comment. Change the value type of BlockVarCopyInits to PointerIntPair. The boolean flag indicates whether the copy expression can throw. Serialize/deserialize the copy expression and the boolean flag and add a regression test to te

[PATCH] D50415: [clangd] extend the publishDiagnostics response to send back fixits to the client directly as well (if requested)

2018-08-08 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 159760. arphaman added a comment. - Client now can request the fixes using a 'clientCapabilities/textDocument/publishDiagnostics' extension. - Use 'Fixes' instead of 'Fixits' in code. https://reviews.llvm.org/D50415 Files: clangd/ClangdLSPServer.cpp c

[PATCH] D45619: [Time-report] (1) Use special new Clang flag 'FrontendTimesIsEnabled' instead of 'llvm::TimePassesIsEnabled' inside -ftime-report feature

2018-08-08 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Correct me if I'm wrong, but after this change llvm no longer enables the timing of individual passes when -ftime-report is passed? Was that intentional? Repository: rL LLVM https://reviews.llvm.org/D45619 ___ cfe-c

[PATCH] D49986: [ADT] ImmutableList::add parameters are switched

2018-08-08 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a subscriber: dblaikie. Szelethus added a comment. In https://reviews.llvm.org/D49985#1181568, @NoQ wrote: > In https://reviews.llvm.org/D49985#1181564, @dblaikie wrote: > > > It looks like concat orders the arguments in the same way that the output > > would be (so concat(X, lis

[PATCH] D45619: [Time-report] (1) Use special new Clang flag 'FrontendTimesIsEnabled' instead of 'llvm::TimePassesIsEnabled' inside -ftime-report feature

2018-08-08 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Oh, oops, I should have spotted that. No, the point of this was to separate the timing infrastructure, not to change the behavior of -ftime-report. Should be a one-line change to add "llvm::TimePassesIsEnabled = TimePasses" back to BackendConsumer::BackendConsumer. (

[PATCH] D45619: [Time-report] (1) Use special new Clang flag 'FrontendTimesIsEnabled' instead of 'llvm::TimePassesIsEnabled' inside -ftime-report feature

2018-08-08 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Ok I'll add that back. I'm unclear why the we would want to assign clang's FrontendTimesIsEnabled from inside CodeGenAction. If I'm understanding the intentions here, the goal was to add more timing infrastructure to clang. But if the enabling is tied to CodeGenAc

[PATCH] D48687: [clangd] Avoid duplicates in findDefinitions response

2018-08-08 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 159768. simark added a comment. Formatting. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48687 Files: clangd/FindSymbols.cpp clangd/SourceCode.cpp clangd/SourceCode.h clangd/XRefs.cpp unittests/clangd/TestFS.cpp unittests/clang

r339281 - [CodeGen][Timers] Enable llvm::TimePassesIsEnabled when -ftime-report is specified

2018-08-08 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Aug 8 12:14:23 2018 New Revision: 339281 URL: http://llvm.org/viewvc/llvm-project?rev=339281&view=rev Log: [CodeGen][Timers] Enable llvm::TimePassesIsEnabled when -ftime-report is specified r330571 added a new FrontendTimesIsEnabled variable and replaced many usages of

[PATCH] D45619: [Time-report] (1) Use special new Clang flag 'FrontendTimesIsEnabled' instead of 'llvm::TimePassesIsEnabled' inside -ftime-report feature

2018-08-08 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Assignment restored in r339281. I'll file a bug to merge to 7.0 Repository: rL LLVM https://reviews.llvm.org/D45619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

[PATCH] D50122: Complex Variable defined in InitCapture Crash fix

2018-08-08 Thread Balaji Iyer via Phabricator via cfe-commits
bviyer added a comment. Ping! Repository: rC Clang https://reviews.llvm.org/D50122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50436: Correctly initialise global blocks on Windows.

2018-08-08 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Alright, LGTM, at least until we have that backend support you mentioned. Repository: rC Clang https://reviews.llvm.org/D50436 ___ cfe-com

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-08 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGObjCGNU.cpp:3542 + allSelectors.push_back(entry.first); +std::sort(allSelectors.begin(), allSelectors.end()); mgrang wrote: > Please use llvm::sort instead of std::sort. See > https://llvm.org/

[PATCH] D50122: Complex Variable defined in InitCapture Crash fix

2018-08-08 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: lib/Sema/SemaTemplateInstantiate.cpp:2916-2918 + if (const VarDecl *VD = dyn_cast(D)) +if (VD->isInitCapture()) + return nullptr; Why are we failing to find the instantiation of the VarDecl in this case

r339282 - [Builtins] Implement __builtin_clrsb to be compatible with gcc

2018-08-08 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Aug 8 12:55:52 2018 New Revision: 339282 URL: http://llvm.org/viewvc/llvm-project?rev=339282&view=rev Log: [Builtins] Implement __builtin_clrsb to be compatible with gcc gcc defines an intrinsic called __builtin_clrsb which counts the number of extra sign bits on a num

[PATCH] D50168: [Builtins] Implement __builtin_clrsb to be compatible with gcc

2018-08-08 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC339282: [Builtins] Implement __builtin_clrsb to be compatible with gcc (authored by ctopper, committed by ). Herald added a subscriber: kristina. Repository: rC Clang https://reviews.llvm.org/D50168 F

[PATCH] D50152: [CodeGen] Merge equivalent block copy/helper functions

2018-08-08 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/ASTContext.h:248 + /// Mapping from __block VarDecls to their copy initialization expr. The + /// boolean flag indicates whether the expression can throw. + typedef llvm::DenseMaphttps://reviews.llvm.org/D50152 _

[PATCH] D45639: [Driver] Support default libc++ library location on Darwin

2018-08-08 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a subscriber: jfb. beanz added a comment. Adding @jfb since this is his domain now too. Repository: rC Clang https://reviews.llvm.org/D45639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D45639: [Driver] Support default libc++ library location on Darwin

2018-08-08 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In https://reviews.llvm.org/D45639#1192849, @beanz wrote: > Adding @jfb since this is his domain now too. @ldionne is the libc++ expert :-) Repository: rC Clang https://reviews.llvm.org/D45639 ___ cfe-commits mailing list

[PATCH] D44671: [libcxx] Enable static libcxxabi linking on Darwin

2018-08-08 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. Were the concerns expressed in https://reviews.llvm.org/D8017 addressed? Repository: rCXX libc++ https://reviews.llvm.org/D44671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D50471: [Builtins] Add __bulitin_clrsb support to IntExprEvaluator::VisitBuiltinCallExpr

2018-08-08 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: bkramer, erichkeane. Now that __builtin_clrsb is supported by clang, this patch adds constant evaluation of it to address the FIXME. https://reviews.llvm.org/D50471 Files: lib/AST/ExprConstant.cpp test/Sema/constant-builtins

[PATCH] D45444: [clang-tidy] implement new check for const-correctness

2018-08-08 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 159775. JonasToth added a comment. - fix bug with AnalyzeValues==false skipping whole check, adjust test code to 'const' instead of const Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45444 Files: clang-tidy/cppcoreguidelines/CMakeLis

[PATCH] D50471: [Builtins] Add __bulitin_clrsb support to IntExprEvaluator::VisitBuiltinCallExpr

2018-08-08 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. Looks easy enough, just note the test issue. Comment at: test/Sema/constant-builtins-2.c:191 +char clrsb11[__builtin_clrsb(0xf) == BITSIZE(int) - 5 ? 1 : -1]; +char c

[PATCH] D50471: [Builtins] Add __bulitin_clrsb support to IntExprEvaluator::VisitBuiltinCallExpr

2018-08-08 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 159777. craig.topper added a comment. Fix duplicate variable name in the test. Not sure why that didn't complain https://reviews.llvm.org/D50471 Files: lib/AST/ExprConstant.cpp test/Sema/constant-builtins-2.c Index: test/Sema/constant-builtins-2.

r339284 - [Headers] Define *_HAS_SUBNORM for FLT, DBL, LDBL

2018-08-08 Thread Pirama Arumuga Nainar via cfe-commits
Author: pirama Date: Wed Aug 8 13:38:38 2018 New Revision: 339284 URL: http://llvm.org/viewvc/llvm-project?rev=339284&view=rev Log: [Headers] Define *_HAS_SUBNORM for FLT, DBL, LDBL Summary: These macros are defined in the C11 standard and can be defined based on the __*_HAS_DENORM__ default mac

[PATCH] D37302: [Headers] Define *_HAS_SUBNORM for FLT, DBL, LDBL

2018-08-08 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC339284: [Headers] Define *_HAS_SUBNORM for FLT, DBL, LDBL (authored by pirama, committed by ). Changed prior to commit: https://reviews.llvm.org/D37302?vs=159330&id=159778#toc Repository: rC Clang h

r339287 - [Builtins] Add __builtin_clrsb support to IntExprEvaluator::VisitBuiltinCallExpr

2018-08-08 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Aug 8 13:59:40 2018 New Revision: 339287 URL: http://llvm.org/viewvc/llvm-project?rev=339287&view=rev Log: [Builtins] Add __builtin_clrsb support to IntExprEvaluator::VisitBuiltinCallExpr This addresses a FIXME that has existed since before clang supported the builtin.

[PATCH] D50471: [Builtins] Add __bulitin_clrsb support to IntExprEvaluator::VisitBuiltinCallExpr

2018-08-08 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC339287: [Builtins] Add __builtin_clrsb support to IntExprEvaluator::VisitBuiltinCallExpr (authored by ctopper, committed by ). Herald added a subscriber: kristina. Changed prior to commit: https://revie

[PATCH] D50477: WIP: Ensure that the type of size_t is represended as one of the fixed width types

2018-08-08 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: cfe-commits, sunfish, aheejin. We recently changes `size_t` on wasm from `int` to `long` which had the effect of making the type of size_t (long) not match either int32_t or int64_t. This solution is not very elegant but fixes the build issu

[PATCH] D50477: WIP: Ensure that the type of size_t is represended as one of the fixed width types

2018-08-08 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 159794. sbc100 added a comment. remove debugging Repository: rC Clang https://reviews.llvm.org/D50477 Files: lib/Frontend/InitPreprocessor.cpp Index: lib/Frontend/InitPreprocessor.cpp ===

r339289 - Revert r339287 "[Builtins] Add __builtin_clrsb support to IntExprEvaluator::VisitBuiltinCallExpr"

2018-08-08 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Aug 8 14:21:21 2018 New Revision: 339289 URL: http://llvm.org/viewvc/llvm-project?rev=339289&view=rev Log: Revert r339287 "[Builtins] Add __builtin_clrsb support to IntExprEvaluator::VisitBuiltinCallExpr" This add an additional unintended change in it. Modified: c

[PATCH] D50152: [CodeGen] Merge equivalent block copy/helper functions

2018-08-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 159800. ahatanak marked 2 inline comments as done. ahatanak added a comment. Modify getBlockVarCopyInits and setBlockVarCopyInits to get and set both the copy expression and the boolean flag that indicates whether the expression can throw or not. Reposito

[PATCH] D50428: [ASTImporter] Add support for importing imaginary literals

2018-08-08 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. This revision is now accepted and ready to land. LGTM! Just a stylish nit. Comment at: lib/AST/ASTImporter.cpp:5617 + + return new (Importer.getToContext()) + ImaginaryLiteral(SubE, T); The line

[PATCH] D45639: [Driver] Support default libc++ library location on Darwin

2018-08-08 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. @phosek I don't understand how you can expect code compiled with new headers to link against an old dylib, unless you're setting the target platform, in which case anything that would fail to link will instead be a compiler error. I mean, we're adding stuff to the dylib

[PATCH] D45639: [Driver] Support default libc++ library location on Darwin

2018-08-08 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. I must say I therefore don't understand the purpose of this patch. Repository: rC Clang https://reviews.llvm.org/D45639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-08 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama added inline comments. Comment at: lib/Sema/SemaChecking.cpp:10411 +->getAs(); + if (!ResultBT || !(RBT && RBT->isFloatingPoint())) return; + Add a comment explaining this conditional as well? > Return if source and target types

r339296 - [VFS] Remove superfluous semicolon from unittest.

2018-08-08 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Aug 8 15:31:14 2018 New Revision: 339296 URL: http://llvm.org/viewvc/llvm-project?rev=339296&view=rev Log: [VFS] Remove superfluous semicolon from unittest. Modified: cfe/trunk/unittests/Basic/VirtualFileSystemTest.cpp Modified: cfe/trunk/unittests/Basic/VirtualFil

r339295 - [Builtins] Add __builtin_clrsb support to IntExprEvaluator::VisitBuiltinCallExpr

2018-08-08 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Aug 8 15:31:12 2018 New Revision: 339295 URL: http://llvm.org/viewvc/llvm-project?rev=339295&view=rev Log: [Builtins] Add __builtin_clrsb support to IntExprEvaluator::VisitBuiltinCallExpr This addresses a FIXME that has existed since before clang supported the builtin.

[PATCH] D50444: [ASTImporter] Fix structural inequivalency of forward EnumDecl

2018-08-08 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. This revision is now accepted and ready to land. Yes, this seems to be correct. Thanks! Comment at: lib/AST/ASTStructuralEquivalence.cpp:1182 + + // Compare the definitions of these two eunums. If either or both are

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/SemaChecking.cpp:10411 +->getAs(); + if (!ResultBT || !(RBT && RBT->isFloatingPoint())) return; + pirama wrote: > Add a comment explaining this conditional as well? > > > Retu

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/SemaChecking.cpp:10411 +->getAs(); + if (!ResultBT || !(RBT && RBT->isFloatingPoint())) return; + nickdesaulniers wrote: > pirama wrote: > > Add a comment explaining this conditi

[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 159820. nickdesaulniers added a comment. - clean up conditional and add comment Repository: rC Clang https://reviews.llvm.org/D50467 Files: lib/Sema/SemaChecking.cpp test/SemaCXX/warn-float-conversion.cpp Index: test/SemaCXX/warn-float-conve

[PATCH] D50462: Try building complete AST after a fatal error was emitted if further diagnostics are expected

2018-08-08 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. This seems sensible to me. Comment at: include/clang/Basic/Diagnostic.h:764 + /// off extra processing that might be wasteful in this case. +bool areDiagnosticsSuppressedAfterFatalError() const { +return FatalErrorOccurred && SuppressAfterFata

[PATCH] D50462: Try building complete AST after a fatal error was emitted if further diagnostics are expected

2018-08-08 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. On a second look I think that there is value separating the concepts of 'producing diagnostics' after hitting the fatal error (which is SuppressAfterFatalError currently does), and trying to build a more complete AST. For example, - An editor client might not want to

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: morehouse, kcc. Herald added a subscriber: cfe-commits. I noticed that my code wasn't going deep into the loop vectorizer code so added another pass that makes it go further. Repository: rC Clang https://reviews.llvm.org/D5048

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 159831. emmettneyman added a comment. - minor style fix Repository: rC Clang https://reviews.llvm.org/D50482 Files: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp Index: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:90 +getCodeModel(), OLvl); +} + If you have to pass that many parameters to a 3 line function, just inline instead. ==

[PATCH] D50152: [CodeGen] Merge equivalent block copy/helper functions

2018-08-08 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/ASTContext.h:248 + /// Mapping from __block VarDecls to their copy initialization expr. The + /// boolean flag indicates whether the expression can throw. + typedef llvm::DenseMap Maybe you should just make a type f

[PATCH] D36357: Added a better diagnostic when using the delete operator with lambdas

2018-08-08 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 159832. Rakete added a comment. Rebase + friendly ping :) Repository: rC Clang https://reviews.llvm.org/D36357 Files: include/clang/Basic/DiagnosticParseKinds.td lib/Parse/ParseExprCXX.cpp test/FixIt/fixit-cxx0x.cpp test/Parser/cxx0x-lambd

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:126 + + auto Is TM guaranteed to be an LLVMTargetMachine? Yes, since the t

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 159834. emmettneyman added a comment. - Inlined function Repository: rC Clang https://reviews.llvm.org/D50482 Files: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp Index: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp ===

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added inline comments. This revision is now accepted and ready to land. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:103 + Triple ModuleTriple(M->getTargetTriple()); + const TargetOptions Options = InitTargetOpti

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:103 + Triple ModuleTriple(M->getTargetTriple()); + const TargetOptions Options = InitTargetOptionsFromCodeGenFlags(); morehouse wrote: > I think you can avoid

r339304 - Delete some unreachable AST printing code.

2018-08-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Aug 8 17:44:49 2018 New Revision: 339304 URL: http://llvm.org/viewvc/llvm-project?rev=339304&view=rev Log: Delete some unreachable AST printing code. Modified: cfe/trunk/lib/AST/TypePrinter.cpp Modified: cfe/trunk/lib/AST/TypePrinter.cpp URL: http://llvm.org/viewvc

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 159838. emmettneyman added a comment. Rebase Repository: rC Clang https://reviews.llvm.org/D50482 Files: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp Index: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp =

r339305 - Added another optimization pass to make vectorizing possible

2018-08-08 Thread Emmett Neyman via cfe-commits
Author: emmettneyman Date: Wed Aug 8 17:58:23 2018 New Revision: 339305 URL: http://llvm.org/viewvc/llvm-project?rev=339305&view=rev Log: Added another optimization pass to make vectorizing possible Summary: I noticed that my code wasn't going deep into the loop vectorizer code so added another

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Emmett Neyman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339305: Added another optimization pass to make vectorizing possible (authored by emmettneyman, committed by ). Changed prior to commit: https://reviews.llvm.org/D50482?vs=159838&id=159839#toc Reposito

r339306 - Refactor attribute printing to be a bit more obviously-correct.

2018-08-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Aug 8 18:21:06 2018 New Revision: 339306 URL: http://llvm.org/viewvc/llvm-project?rev=339306&view=rev Log: Refactor attribute printing to be a bit more obviously-correct. No functionality change intended. Added: cfe/trunk/test/Misc/ast-print-attr.c Modified: cfe

[PATCH] D50487: [CFG] [analyzer] Find argument constructors in CXXTemporaryObjectExprs.

2018-08-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, mikhail.ramalho, baloghadamsoftware. `CXXTemporaryObjectExpr` is a sub-class of `CXXConstructExpr` that represents a construct-expression wr

[clang-tools-extra] r339307 - [CMake] Use normalized Windows target triples

2018-08-08 Thread Petr Hosek via cfe-commits
Author: phosek Date: Wed Aug 8 19:16:18 2018 New Revision: 339307 URL: http://llvm.org/viewvc/llvm-project?rev=339307&view=rev Log: [CMake] Use normalized Windows target triples Changes the default Windows target triple returned by GetHostTriple.cmake from the old environment names (which we wan

r339307 - [CMake] Use normalized Windows target triples

2018-08-08 Thread Petr Hosek via cfe-commits
Author: phosek Date: Wed Aug 8 19:16:18 2018 New Revision: 339307 URL: http://llvm.org/viewvc/llvm-project?rev=339307&view=rev Log: [CMake] Use normalized Windows target triples Changes the default Windows target triple returned by GetHostTriple.cmake from the old environment names (which we wan

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like keys

2018-08-08 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: NoQ, george.karpenkov, whisperity. Herald added subscribers: mikhail.ramalho, a.sidorin, rnkovacs, szepet, xazax.hun, mgorny. Repository: rC Clang https://reviews.llvm.org/D50488 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td

[PATCH] D50152: [CodeGen] Merge equivalent block copy/helper functions

2018-08-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/AST/ASTContext.h:158 +Expr *CopyExpr; +bool CanThrow; + }; rjmccall wrote: > Using a PointerIntPair in the implementation of this is still a reasonable > choice. Just make it a proper abstractio

[PATCH] D50152: [CodeGen] Merge equivalent block copy/helper functions

2018-08-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 159850. ahatanak marked 5 inline comments as done. ahatanak added a comment. Address review comments. Repository: rC Clang https://reviews.llvm.org/D50152 Files: include/clang/AST/ASTContext.h lib/AST/ASTContext.cpp lib/CodeGen/CGBlocks.cpp lib/

[PATCH] D50152: [CodeGen] Merge equivalent block copy/helper functions

2018-08-08 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGBlocks.cpp:1682 + if (IsCopyHelper && Ctx.getBlockVarCopyInits(Var).CanThrow) +Name += "c"; +} ahatanak wrote: > rjmccall wrote: > > I don't think you need to add `d` to the na

[PATCH] D50447: [clang-tidy] Add a whitelistClasses option in performance-for-range-copy check.

2018-08-08 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added a comment. In https://reviews.llvm.org/D50447#1192393, @JonasToth wrote: > ... just check if the variable is dereferenced in the scope of the loop (any > declRefExpr exists). +1 And I would imagine it's very rare (as in categories not raw number of occurrences) for a loop vari

[PATCH] D50493: AMDGPU: Add another missing builtin

2018-08-08 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: kzhuravl, b-sumner. Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng. https://reviews.llvm.org/D50493 Files: include/clang/Basic/BuiltinsAMDGPU.def test/CodeGenOpenCL/builtins-amdgcn-ci.cl test/SemaOpenCL/builtins-

<    1   2