[PATCH] D29724: [Driver] Report available language standards on user error

2017-02-10 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode added a comment. Indeed, thanks :) I ran `make check-all` and had no errors so I thought there are no tests. Comment at: lib/Frontend/CompilerInvocation.cpp:1709 +Diags.Report(diag::note_drv_supported_value_with_description) + << Std.getName() <<

r294772 - clang-format: don't break code using __has_include, PR31908

2017-02-10 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Feb 10 13:36:52 2017 New Revision: 294772 URL: http://llvm.org/viewvc/llvm-project?rev=294772=rev Log: clang-format: don't break code using __has_include, PR31908 Modified: cfe/trunk/lib/Format/FormatToken.h cfe/trunk/lib/Format/TokenAnnotator.cpp

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-02-10 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D28404#673260, @mehdi_amini wrote: > Ping :) To clarify my understanding of this thread, it seems like there are three ways forward here: 1. To have -O0 add optnone to the generated functions (enabling some degree of lack of optimization

[PATCH] D29819: Introduce an 'external_source_symbol' attribute that describes the origin and the nature of a declaration

2017-02-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added inline comments. This revision now requires changes to proceed. Comment at: include/clang/Basic/Attr.td:532 + let Spellings = [GNU<"external_source_symbol">, + CXX11<"gnu",

[PATCH] D29839: [clang-tidy] New misc-istream-overflow check

2017-02-10 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. Nice check! :) Comment at: clang-tidy/misc/IstreamOverflowCheck.cpp:59-61 + if (ConstType) { +ArraySize = ConstType->getSize(); + } same here Comment at: clang-tidy/misc/IstreamOverflowCheck.cpp:78-80 +if

r294773 - [c++1z] Disallow deduction guides with deduced types that don't syntactically match the template being deduced.

2017-02-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 10 13:49:50 2017 New Revision: 294773 URL: http://llvm.org/viewvc/llvm-project?rev=294773=rev Log: [c++1z] Disallow deduction guides with deduced types that don't syntactically match the template being deduced. Modified:

[PATCH] D29817: [AVR] Fix __AVR_xxx macro definitions

2017-02-10 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn updated this revision to Diff 88025. Lekensteyn marked an inline comment as done. Lekensteyn added a comment. Good catch! I just checked again and confirmed that there is only one line that had this issue (there are no other occurrences of `___"`). https://reviews.llvm.org/D29817

[PATCH] D29724: [Driver] Report available language standards on user error

2017-02-10 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode updated this revision to Diff 88029. idlecode added a comment. Added test, changed printout style a bit (but this still needs to be checked) https://reviews.llvm.org/D29724 Files: include/clang/Basic/DiagnosticDriverKinds.td lib/Frontend/CompilerInvocation.cpp

[PATCH] D29830: [OpenCL][Doc] Relase 4.0 notes for OpenCL

2017-02-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. https://reviews.llvm.org/D29830 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNotes.rst === --- docs/ReleaseNotes.rst +++ docs/ReleaseNotes.rst @@ -17,7 +17,7 @@ Introduction

[PATCH] D29817: [AVR] Fix __AVR_xxx macro definitions

2017-02-10 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/Basic/Targets.cpp:8464 static ArrayRef AVRMcus = { - { "at90s1200", "__AVR_AT90S1200__" }, - { "attiny11", "__AVR_ATtiny11" }, - { "attiny12", "__AVR_ATtiny12" }, - { "attiny15", "__AVR_ATtiny15" }, - { "attiny28",

[PATCH] D29827: [AVR] Add -mmcu option to the driver

2017-02-10 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: include/clang/Driver/Options.td:1613 def mcpu_EQ : Joined<["-"], "mcpu=">, Group; +def mmcu_EQ : Joined<["-"], "mmcu=">, Group; def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group; Would it make sense to

Re: [PATCH] D29758: [OpenMP] Parallel reduction on the NVPTX device.

2017-02-10 Thread Alexey Bataev via cfe-commits
Arpith, see the comment in CGOpenMPRuntime.cpp // if SimpleReduction is true, only the next code is generated: // ... // [i] = RedOp(*[i], *[i]); // ... and is used for omp simd directive only. - Best regards, Alexey Bataev 10.02.2017 18:49, Arpith Jacob via

[PATCH] D29530: [ubsan] Reduce null checking of C++ object pointers (PR27581)

2017-02-10 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Ah, I did miss ParenExpr. Maybe it would be better to use Expr::isImplicitCXXThis, since it handles this case and some more. Later, we can go back and see if it's feasible to handle static/const casts in isImplicitCXXThis to catch more cases. In

[PATCH] D29817: [AVR] Fix __AVR_xxx macro definitions

2017-02-10 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D29817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29829: [OpenCL][Doc] Description for adding OpenCL vendor extension in user manual

2017-02-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Adding a description of a new feature that allows to specify vendor extension in flexible way using compiler pragma instead of modifying source code directly. Feature committed in Clang@r289979. https://reviews.llvm.org/D29829 Files: docs/UsersManual.rst

Re: Patch for Bug 30413

2017-02-10 Thread Lobron, David via cfe-commits
Hi Vedant, Thanks for the reply! Yes, I have a small test case- I actually attached it to the original bug report (https://llvm.org/bugs/show_bug.cgi?id=30413), but I will go ahead and try adding it to clang/test/CodeGenObjC, or extend a case if possible. Is it OK to make changes to

[clang-tools-extra] r294760 - [clangd] Move isDone from the JSONOutput to ShutdownHandler.

2017-02-10 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Feb 10 11:25:38 2017 New Revision: 294760 URL: http://llvm.org/viewvc/llvm-project?rev=294760=rev Log: [clangd] Move isDone from the JSONOutput to ShutdownHandler. This is just as easy to check from main but prevents random code from shutting down the server. Modified:

[PATCH] D29827: [AVR] Add -mmcu option to the driver

2017-02-10 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn added inline comments. Comment at: include/clang/Driver/Options.td:1613 def mcpu_EQ : Joined<["-"], "mcpu=">, Group; +def mmcu_EQ : Joined<["-"], "mmcu=">, Group; def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group; jroelofs wrote: > Would

[PATCH] D29764: [OpenCL] Blocks cannot capture/reference another block

2017-02-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D29764#673548, @Nicola wrote: > Looking at "Example 4" in the standard it looks like this should also be > illegal. > > int (^block1)(void) = ^int {return 1;}; > int foo() { return block1(); } > > __kernel void k(global int *z) > { >

[PATCH] D29469: Fix PR31843: Clang-4.0 crashes/assert while evaluating __builtin_object_size

2017-02-10 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. End of week ping :) https://reviews.llvm.org/D29469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: Patch for Bug 30413

2017-02-10 Thread Vedant Kumar via cfe-commits
> On Feb 10, 2017, at 8:29 AM, Lobron, David wrote: > > Hi Vedant, > > Thanks for the reply! Yes, I have a small test case- I actually attached it > to the original bug report (https://llvm.org/bugs/show_bug.cgi?id=30413), but > I will go ahead and try adding it to

[PATCH] D29830: [OpenCL][Doc] Relase 4.0 notes for OpenCL

2017-02-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks! https://reviews.llvm.org/D29830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r294781 - [XRay] Implement powerpc64le xray.

2017-02-10 Thread Tim Shen via cfe-commits
Author: timshen Date: Fri Feb 10 15:03:24 2017 New Revision: 294781 URL: http://llvm.org/viewvc/llvm-project?rev=294781=rev Log: [XRay] Implement powerpc64le xray. Summary: powerpc64 big-endian is not supported, but I believe that most logic can be shared, except for xray_powerpc64.cc. Also add

r294800 - Don't let EvaluationModes dictate whether an invalid base is OK

2017-02-10 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Fri Feb 10 16:52:29 2017 New Revision: 294800 URL: http://llvm.org/viewvc/llvm-project?rev=294800=rev Log: Don't let EvaluationModes dictate whether an invalid base is OK What we want to actually control this behavior is something more local than an EvalutationMode. Please see

[PATCH] D29469: Fix PR31843: Clang-4.0 crashes/assert while evaluating __builtin_object_size

2017-02-10 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. Thanks! https://reviews.llvm.org/D29469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r294778 - [c++1z] Enforce restriction that deduction guide is declared in the same scope as its template.

2017-02-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 10 14:39:58 2017 New Revision: 294778 URL: http://llvm.org/viewvc/llvm-project?rev=294778=rev Log: [c++1z] Enforce restriction that deduction guide is declared in the same scope as its template. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D29839: [clang-tidy] New misc-istream-overflow check

2017-02-10 Thread Kostya Kortchinsky via Phabricator via cfe-commits
cryptoad updated this revision to Diff 88047. cryptoad added a comment. Addressing first batch of comments. https://reviews.llvm.org/D29839 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/IstreamOverflowCheck.cpp clang-tidy/misc/IstreamOverflowCheck.h

[PATCH] D29839: [clang-tidy] New misc-istream-overflow check

2017-02-10 Thread Kostya Kortchinsky via Phabricator via cfe-commits
cryptoad marked 5 inline comments as done. cryptoad added inline comments. Comment at: clang-tidy/misc/IstreamOverflowCheck.cpp:78-80 +if (!Arg->isIntegerConstantExpr(WidthSize, Context)) { + llvm::errs() << "Couldn't get width() size.\n"; +} Prazek

[PATCH] D29739: Make Lit tests C++11 compatible - Objective-C++

2017-02-10 Thread Charles Li via Phabricator via cfe-commits
tigerleapgorge added a comment. Hi John, Here is the most recent discussion I can find on cfe-dev. “I'm guessing that Objective-C/C++ is kind of passe, so nobody is really interested in modernizing it” http://lists.llvm.org/pipermail/cfe-dev/2016-December/051844.html As far as I am aware,

[PATCH] D28835: [coroutines] NFC: Refactor Sema::CoroutineBodyStmt construction.

2017-02-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF requested changes to this revision. EricWF added a comment. This revision now requires changes to proceed. This currently segfaults on my machine. Here is the full output of running `SemaCXX/coroutines.cpp`. https://gist.github.com/EricWF/81dc332e21c3e5c6bdc024cda87b846f I'm not sure

[PATCH] D29827: [AVR] Add -mmcu option to the driver

2017-02-10 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn added inline comments. Comment at: include/clang/Driver/Options.td:1613 def mcpu_EQ : Joined<["-"], "mcpu=">, Group; +def mmcu_EQ : Joined<["-"], "mmcu=">, Group; def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group; dylanmckay wrote: >

[PATCH] D29724: [Driver] Report available language standards on user error

2017-02-10 Thread Richard Smith via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticDriverKinds.td:233 "AddressSanitizer doesn't support linking with debug runtime libraries yet">; +def note_drv_supported_values : Note<"supported values are:">; +def

r294796 - [c++1z] Diagnose attempts to use variables with deduced class template

2017-02-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 10 16:35:37 2017 New Revision: 294796 URL: http://llvm.org/viewvc/llvm-project?rev=294796=rev Log: [c++1z] Diagnose attempts to use variables with deduced class template specialization types from within their own initializers. Added:

Re: r294800 - Don't let EvaluationModes dictate whether an invalid base is OK

2017-02-10 Thread George Burgess IV via cfe-commits
Hi Hans! This fixes PR31843, which is a release blocker. Once the bots seem happy with it, can we merge this into the 4.0 branch, please? (Richard okayed this when he LGTM'ed the patch) Thanks, George On Fri, Feb 10, 2017 at 2:52 PM, George Burgess IV via cfe-commits <

[PATCH] D28543: Elliminates uninitialized warning for volitile varibles.

2017-02-10 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In https://reviews.llvm.org/D28543#671953, @hfinkel wrote: > What's the motivation for this? The placement of a local volatile variable is > still under the compiler's direction, and unless the address escapes, we > still assume we can reason about its aliasing (and,

[PATCH] D29621: Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

2017-02-10 Thread Samuel Benzaquen via Phabricator via cfe-commits
sbenza added inline comments. Comment at: include/clang/Tooling/RefactoringCallbacks.h:61 +MatchFinder.addMatcher(Matcher, Callback); +Callbacks.emplace_back(Callback); + } jbangert wrote: > sbenza wrote: > > Why emplace_back instead of push_back? >

r294785 - [c++1z] Require an initializer for deduced class template specialization types.

2017-02-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 10 15:40:29 2017 New Revision: 294785 URL: http://llvm.org/viewvc/llvm-project?rev=294785=rev Log: [c++1z] Require an initializer for deduced class template specialization types. It's actually meaningful and useful to allow such variables to have no initializer, but

[PATCH] D29739: Make Lit tests C++11 compatible - Objective-C++

2017-02-10 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D29739#673933, @tigerleapgorge wrote: > Hi John, > > Here is the most recent discussion I can find on cfe-dev. > “I'm guessing that Objective-C/C++ is kind of passe, so nobody is really > interested in modernizing it” >

[PATCH] D28543: Elliminates uninitialized warning for volitile varibles.

2017-02-10 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Please fix the spelling errors in the titel / summary before commit. I somewhat agree with Hal -- I think this is too aggressive. Common use cases for local volatile include atomic ops or returns-twice functions like setjmp/longjmp. Disabling the warning in those cases

[PATCH] D29469: Fix PR31843: Clang-4.0 crashes/assert while evaluating __builtin_object_size

2017-02-10 Thread Richard Smith via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, I think this is also OK for Clang 4 if Hans is willing to take it. Comment at: lib/AST/ExprConstant.cpp:607-612 + /// Evaluate as a constant expression. In

[libcxx] r294798 - Fix a bug I introduced in the tests for experimental::lcm and experimental::gcd.

2017-02-10 Thread Marshall Clow via cfe-commits
Author: marshall Date: Fri Feb 10 16:44:14 2017 New Revision: 294798 URL: http://llvm.org/viewvc/llvm-project?rev=294798=rev Log: Fix a bug I introduced in the tests for experimental::lcm and experimental::gcd. Modified:

[PATCH] D29469: Fix PR31843: Clang-4.0 crashes/assert while evaluating __builtin_object_size

2017-02-10 Thread George Burgess IV via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL294800: Don't let EvaluationModes dictate whether an invalid base is OK (authored by gbiv). Changed prior to commit: https://reviews.llvm.org/D29469?vs=86870=88061#toc Repository: rL LLVM

[libcxx] r294779 - Make lcm/gcd work better in edge cases. Fixes a UBSAN failure.

2017-02-10 Thread Marshall Clow via cfe-commits
Author: marshall Date: Fri Feb 10 14:49:08 2017 New Revision: 294779 URL: http://llvm.org/viewvc/llvm-project?rev=294779=rev Log: Make lcm/gcd work better in edge cases. Fixes a UBSAN failure. Modified: libcxx/trunk/include/experimental/numeric libcxx/trunk/include/numeric

[PATCH] D29827: [AVR] Add -mmcu option to the driver

2017-02-10 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added inline comments. Comment at: include/clang/Driver/Options.td:1613 def mcpu_EQ : Joined<["-"], "mcpu=">, Group; +def mmcu_EQ : Joined<["-"], "mmcu=">, Group; def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group; Lekensteyn wrote: >

[PATCH] D29851: [clang-tools-extra] [test] Fix test dependencies when using installed tools

2017-02-10 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added a project: clang-tools-extra. Use the LLVM_UTILS_PROVIDED variable to determine whether test tool dependencies should be exposed for clang-tools-extra tests. If clang is being built stand-alone and LLVM test tools (FileCheck, count and not) are

[PATCH] D29469: Fix PR31843: Clang-4.0 crashes/assert while evaluating __builtin_object_size

2017-02-10 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a reviewer: nlopes. dexonsmith added a comment. +Nuno, who worked on objectsize in the past. https://reviews.llvm.org/D29469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29839: [clang-tidy] New misc-istream-overflow check

2017-02-10 Thread Kostya Kortchinsky via Phabricator via cfe-commits
cryptoad updated this revision to Diff 88048. cryptoad added a comment. Missing line separators. https://reviews.llvm.org/D29839 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/IstreamOverflowCheck.cpp clang-tidy/misc/IstreamOverflowCheck.h clang-tidy/misc/MiscTidyModule.cpp

[PATCH] D28835: [coroutines] NFC: Refactor Sema::CoroutineBodyStmt construction.

2017-02-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. This LGTM after applying the fixes. Comment at: lib/Sema/SemaCoroutine.cpp:719 + + if (!PromiseRecordDecl) +return true; I figured out what's going on. `PromiseRecordDecl` doesn't get initialized to null when

[PATCH] D29843: [CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility

2017-02-10 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr updated this revision to Diff 88064. https://reviews.llvm.org/D29843 Files: lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/ItaniumCXXABI.cpp Index: lib/CodeGen/ItaniumCXXABI.cpp === ---

[PATCH] D29843: [CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility

2017-02-10 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr updated this revision to Diff 88068. mcgrathr added a comment. This now passes check-clang. https://reviews.llvm.org/D29843 Files: lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/ItaniumCXXABI.cpp test/CodeGenCXX/global-init.cpp

[PATCH] D29843: [CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility

2017-02-10 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added a comment. This was just the first crack, my first attempt at any change in LLVMland. I don't know how to run the tests yet. https://reviews.llvm.org/D29843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29843: [CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility

2017-02-10 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D29843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29857: Catch trivially true statements of the form a != 1 || a != 3. Statements likethese are likely errors. They are particularly easy to miss when handling enums:enum State {RUNNING, STOPPE

2017-02-10 Thread Blaise Watson via Phabricator via cfe-commits
watsond updated this revision to Diff 88072. watsond added a comment. Updating D29857: Catch trivially true statements of the form a != 1 || a != 3. Statements like == these are likely errors. They are

[PATCH] D29857: Catch trivially true statements of the form a != 1 || a != 3. Statements likethese are likely errors. They are particularly easy to miss when handling enums:enum State {RUNNING, STOPPE

2017-02-10 Thread Blaise Watson via Phabricator via cfe-commits
watsond abandoned this revision. watsond added a comment. Apologies all. I messed up the formatting. Resubmitting in a second. https://reviews.llvm.org/D29857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r294800 - Don't let EvaluationModes dictate whether an invalid base is OK

2017-02-10 Thread Hans Wennborg via cfe-commits
Sgtm. Go ahead and merge when the bots have chewed on it for a bit, otherwise I'll do it next week. Thanks, Hans On Fri, Feb 10, 2017 at 3:06 PM, George Burgess IV wrote: > Hi Hans! > > This fixes PR31843, which is a release blocker. Once the bots seem happy > with

[PATCH] D29859: Make Lit tests C++11 compatible - nounwind noexcept

2017-02-10 Thread Charles Li via Phabricator via cfe-commits
tigerleapgorge created this revision. I am continuing to make Lit tests C++11 compatible. There are 3 tests in this patch (previously in https://reviews.llvm.org/D24812). All 3 tests relate to C++11 destructors being nonthrowing by default. CodeGenCXX/linetable-cleanup.cpp C::~C() has an

[PATCH] D29859: Make Lit tests C++11 compatible - nounwind noexcept

2017-02-10 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. LGTM. https://reviews.llvm.org/D29859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29843: [CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility

2017-02-10 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In https://reviews.llvm.org/D29843#674111, @mcgrathr wrote: > This is for clang, not llvm. Should it be cfe-commits instead of > llvm-commits? Right, my mistake. https://reviews.llvm.org/D29843 ___ cfe-commits mailing

[PATCH] D29843: [CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility

2017-02-10 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. You can use `ninja check-clang` to run Clang tests, if those pass you can use `ninja check-all` to run all tests. Testing guide has details about testing in LLVM. https://reviews.llvm.org/D29843

[PATCH] D29843: [CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility

2017-02-10 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr updated this revision to Diff 88067. https://reviews.llvm.org/D29843 Files: lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/ItaniumCXXABI.cpp test/CodeGenCXX/global-init.cpp test/OpenMP/threadprivate_codegen.cpp Index:

[PATCH] D29858: [clang-tidy] Catch trivially true statements like a != 1 || a != 3

2017-02-10 Thread Blaise Watson via Phabricator via cfe-commits
watsond created this revision. Herald added a subscriber: JDevlieghere. Catch trivially true statements of the form a != 1 || a != 3. Statements like these are likely errors. They are particularly easy to miss when handling enums: enum State { RUNNING, STOPPED, STARTING, ENDING } ... if (state

r294802 - [c++1z] Tests for class template argument deduction in dependent contexts.

2017-02-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 10 17:10:17 2017 New Revision: 294802 URL: http://llvm.org/viewvc/llvm-project?rev=294802=rev Log: [c++1z] Tests for class template argument deduction in dependent contexts. Modified: cfe/trunk/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp Modified:

[PATCH] D29843: [CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility

2017-02-10 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. Did you run all tests? I'd suspect that this might break `test/OpenMP/threadprivate_codegen.cpp` which is expecting `@__dso_handle = external global i8` which will now be `hidden global`? https://reviews.llvm.org/D29843

[PATCH] D29857: Catch trivially true statements of the form a != 1 || a != 3. Statements likethese are likely errors. They are particularly easy to miss when handling enums:enum State {RUNNING, STOPPE

2017-02-10 Thread Blaise Watson via Phabricator via cfe-commits
watsond created this revision. ...ENDING) ... [clang-tidy] Catch trivially true statements like a != 1 || a != 3 https://reviews.llvm.org/D29857 Files: clang-tidy/misc/RedundantExpressionCheck.cpp test/clang-tidy/misc-redundant-expression.cpp Index:

r294815 - Move test include file from include/ to Inputs/

2017-02-10 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Feb 10 18:52:01 2017 New Revision: 294815 URL: http://llvm.org/viewvc/llvm-project?rev=294815=rev Log: Move test include file from include/ to Inputs/ The Inputs/ directory is the recommended location for extra files for test cases. No functional change. Added:

r294820 - Update XFAIL line after r294781.

2017-02-10 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Feb 10 20:00:03 2017 New Revision: 294820 URL: http://llvm.org/viewvc/llvm-project?rev=294820=rev Log: Update XFAIL line after r294781. Modified: cfe/trunk/test/Driver/XRay/xray-instrument-cpu.c Modified: cfe/trunk/test/Driver/XRay/xray-instrument-cpu.c URL:

[PATCH] D29530: [ubsan] Reduce null checking of C++ object pointers (PR27581)

2017-02-10 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 88075. vsk edited the summary of this revision. vsk added a reviewer: arphaman. vsk added a comment. - Check 'this' once per method. This supports the partial sanitization use-case. - Flesh out the predicate for avoiding null checks on object pointers. I

[PATCH] D29863: [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible parameter types.

2017-02-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This patch fixes http://llvm.org/PR31938. The description below is copy/pasted from the bug: The standard says: template, class Allocator = allocator> class basic_string { using value_type = typename traits::char_type; // ... basic_string(const charT*

[PATCH] D29863: [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible parameter types.

2017-02-10 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. Looks good, though there are some `value_type` constructors left. I've not checked the standard to see if they are all declared with `charT`. Comment at: include/string:782 _LIBCPP_INLINE_VISIBILITY basic_string(const value_type* __s,

[PATCH] D15227: [analyzer] Valist checkers.

2017-02-10 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. @xazax.hun, Can we move this out of alpha? Have this checkers been tested on a large codebase? What are false positive rates? Thanks! Anna Repository: rL LLVM https://reviews.llvm.org/D15227 ___ cfe-commits mailing

[clang-tools-extra] r294823 - Fix memory leak by using unique_ptr

2017-02-10 Thread David Blaikie via cfe-commits
Author: dblaikie Date: Fri Feb 10 23:25:21 2017 New Revision: 294823 URL: http://llvm.org/viewvc/llvm-project?rev=294823=rev Log: Fix memory leak by using unique_ptr Modified: clang-tools-extra/trunk/modularize/CoverageChecker.cpp clang-tools-extra/trunk/modularize/CoverageChecker.h

[PATCH] D29739: Make Lit tests C++11 compatible - Objective-C++

2017-02-10 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In https://reviews.llvm.org/D29739#673971, @rjmccall wrote: > In https://reviews.llvm.org/D29739#673933, @tigerleapgorge wrote: > > > Hi John, > > > > Here is the most recent discussion I can find on cfe-dev. > > “I'm guessing that Objective-C/C++ is kind of passe, so

[PATCH] D29718: [libclang] [OpenCL] Expose half type

2017-02-10 Thread Joey Gouly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL294754: [libclang] [OpenCL] Expose half type. (authored by joey). Changed prior to commit: https://reviews.llvm.org/D29718?vs=87654=88002#toc Repository: rL LLVM https://reviews.llvm.org/D29718

r294754 - [libclang] [OpenCL] Expose half type.

2017-02-10 Thread Joey Gouly via cfe-commits
Author: joey Date: Fri Feb 10 09:51:11 2017 New Revision: 294754 URL: http://llvm.org/viewvc/llvm-project?rev=294754=rev Log: [libclang] [OpenCL] Expose half type. Expose the half type (fp16) through libclang and the python bindings. It seems CXType_LastBuiltin was not updated in b2ea6d9

[PATCH] D29764: [OpenCL] Blocks cannot capture/reference another block

2017-02-10 Thread Nicola Zaghen via Phabricator via cfe-commits
Nicola added a comment. Looking at "Example 4" in the standard it looks like this should also be illegal. int (^block1)(void) = ^int {return 1;}; int foo() { return block1(); } __kernel void k(global int *z) { int (^block2)(void) = ^int { return foo(); // expected-error

[libcxx] r294730 - Recommit "Split exception.cpp and new.cpp implementation into different files for different runtimes."

2017-02-10 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Feb 10 02:57:35 2017 New Revision: 294730 URL: http://llvm.org/viewvc/llvm-project?rev=294730=rev Log: Recommit "Split exception.cpp and new.cpp implementation into different files for different runtimes." This recommits r294707 with additional fixes. The main

[libcxx] r294732 - Fix yet another Apple buildit bug

2017-02-10 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Feb 10 03:25:15 2017 New Revision: 294732 URL: http://llvm.org/viewvc/llvm-project?rev=294732=rev Log: Fix yet another Apple buildit bug Modified: libcxx/trunk/src/typeinfo.cpp Modified: libcxx/trunk/src/typeinfo.cpp URL:

[libcxx] r294731 - Attempt to fix Apple buildit bots

2017-02-10 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Feb 10 03:16:29 2017 New Revision: 294731 URL: http://llvm.org/viewvc/llvm-project?rev=294731=rev Log: Attempt to fix Apple buildit bots Modified: libcxx/trunk/src/new.cpp Modified: libcxx/trunk/src/new.cpp URL:

[PATCH] D29621: Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

2017-02-10 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Looks good. Could you also add test cases where `ReplaceNodeWithTemplate::create` fails to parse templates? https://reviews.llvm.org/D29621 ___

[PATCH] D29806: [clang-tidy] Add -path option to clang-tidy-diff.py

2017-02-10 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. What's your use case? Can it be addressed by just forwarding the -p flag to clang-tidy? The script shouldn't know anything about implementation details of the compilation database

[PATCH] D29817: [AVR} Fix __AVR_xxx macro definitions

2017-02-10 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn created this revision. The -mmcu option for GCC sets macros like __AVR_ATmega328P__ (with the trailing underscores), be sure to include these underscores for Clangs -mcpu option. See "AVR Built-in Macros" in https://gcc.gnu.org/onlinedocs/gcc/AVR-Options.html

[PATCH] D29817: [AVR} Fix __AVR_xxx macro definitions

2017-02-10 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn added a comment. Without this patch, compilation of a program using avr/io.h fails. Tested with: clang --target=avr -Xclang -target-cpu -Xclang atmega328p -I/usr/avr/include -Os led.c -c -o /dev/null Btw, it seems that avr-libc 2.0.0 also uses `__AVR_ARCH__`, `__AVR_XMEGA__` and

[PATCH] D29818: [libcxx] Threading support: Attempt to externalize system_clock::now() and steady_clock::now() implementations

2017-02-10 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath created this revision. These implementations depend heavily on the underlying platform. It would be good to put them behind a porting function within the threading API as quite a bit of threading functionality depend on the clocks. The `steady_clock::now()` implementation was

r294740 - Wdocumentation fixes

2017-02-10 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Fri Feb 10 06:14:01 2017 New Revision: 294740 URL: http://llvm.org/viewvc/llvm-project?rev=294740=rev Log: Wdocumentation fixes Modified: cfe/trunk/lib/CodeGen/MacroPPCallbacks.h Modified: cfe/trunk/lib/CodeGen/MacroPPCallbacks.h URL:

[PATCH] D29819: Introduce an 'external_source_symbol' attribute that describes the origin and the nature of a declaration

2017-02-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This patch adds an `external_source_symbol` attribute to Clang. This attribute specifies that a declaration originates from an external source and describes the nature of that source. This attribute is useful for mixed-language projects or project that use

[PATCH] D29817: [AVR] Fix __AVR_xxx macro definitions

2017-02-10 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Nice catch, unsure why I didn't catch this earlier. Do we also need to modify the other tests inside `target-cpu-defines`? https://reviews.llvm.org/D29817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29817: [AVR] Fix __AVR_xxx macro definitions

2017-02-10 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn updated this revision to Diff 87986. Lekensteyn added a comment. Oops, missed the avrtiny patch. After updating that, it now actually passes the clang-test tests. https://reviews.llvm.org/D29817 Files: lib/Basic/Targets.cpp test/CodeGen/avr/target-cpu-defines/atmega328p.c

[clang-tools-extra] r294747 - [clangd] Refactor stream output into a single thread-safe output object.

2017-02-10 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Feb 10 08:08:40 2017 New Revision: 294747 URL: http://llvm.org/viewvc/llvm-project?rev=294747=rev Log: [clangd] Refactor stream output into a single thread-safe output object. This abstracts away the passing of raw_ostreams everywhere, thread safety will be used soon.

[clang-tools-extra] r294751 - [clang-tidy] Fix handling of function types in google-readability-casting

2017-02-10 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Feb 10 08:57:19 2017 New Revision: 294751 URL: http://llvm.org/viewvc/llvm-project?rev=294751=rev Log: [clang-tidy] Fix handling of function types in google-readability-casting Modified: clang-tools-extra/trunk/clang-tidy/google/AvoidCStyleCastsCheck.cpp

[PATCH] D28286: [CodeCompletion] Code complete the missing C++11 keywords

2017-02-10 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/D28286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29221: clang-format-vsix: "format on save" feature

2017-02-10 Thread Antonio Maiorano via Phabricator via cfe-commits
amaiorano updated this revision to Diff 88000. amaiorano added a comment. - Renamed VsixUtils to Vsix and TypeConverterUtils to TypeConversion - Removed format on save mode The change is simpler now without the "mode" (current or all documents). Now I'm wondering whether I should rename the

[PATCH] D29758: [OpenMP] Parallel reduction on the NVPTX device.

2017-02-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:956-962 virtual void emitReduction(CodeGenFunction , SourceLocation Loc, ArrayRef Privates, ArrayRef LHSExprs,

[PATCH] D29806: [clang-tidy] Add -path option to clang-tidy-diff.py

2017-02-10 Thread Ehsan Akhgari via Phabricator via cfe-commits
ehsan added a comment. In https://reviews.llvm.org/D29806#673329, @alexfh wrote: > What's your use case? Can it be addressed by just forwarding the -p flag to > clang-tidy? I just need to pass the full path to the compilation DB to clang-tidy. The problem is that invoking

[PATCH] D29827: [AVR] Add -mmcu option to the driver

2017-02-10 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn created this revision. Add the AVR-specific -mmcu option for compatibility with GCC (GCC does not use -mcpu nor -march for AVR). This option is needed to inform the frontend to define some macros (for example) and the inform the assembler of the allowed features, so add a test to check

[PATCH] D29758: [OpenMP] Parallel reduction on the NVPTX device.

2017-02-10 Thread Arpith Jacob via Phabricator via cfe-commits
arpith-jacob added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:956-962 virtual void emitReduction(CodeGenFunction , SourceLocation Loc, ArrayRef Privates, ArrayRef LHSExprs,