[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I'll trust Richard on the tricky Sema/AST bits. The functionality of the patch looks basically acceptable to me, although I'm still not thrilled about the idea of actually removing the attribute from the AST rather than just letting it not have effect. But we could c

[PATCH] D41311: [CodeGen] Fix crash when a function taking transparent union is redeclared.

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2321 + ArgI.getCoerceToType() == + ConvertType(isPromoted ? Ty : Arg->getType()) && ArgI.getDirectOffset() == 0) { Maybe a comment explaining why different t

[PATCH] D41311: [CodeGen] Fix crash when a function taking transparent union is redeclared.

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. It doesn't look like this patch would break IRGen for functions that receive fp16 types. fp16 is passed as i32 or float (without promotion) on ARM and as half on ARM64. It should work fine. https://reviews.llvm.org/D41311 ___

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 128839. ahatanak marked 3 inline comments as done. ahatanak added a comment. Rename variable to HasTrivialABIOverride. https://reviews.llvm.org/D41039 Files: include/clang/AST/Decl.h include/clang/AST/DeclCXX.h include/clang/Basic/Attr.td include/c

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:833 // passed in registers, which is non-conforming. if (RD->hasNonTrivialDestructor() && getContext().getTypeSize(RD->getTypeForDecl()) > 64)

r321924 - Test case for r321396

2018-01-05 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Jan 5 19:20:59 2018 New Revision: 321924 URL: http://llvm.org/viewvc/llvm-project?rev=321924&view=rev Log: Test case for r321396 Any hashing for methods should be able to compile this test case without emitting an error. Since the class and method come from the same hea

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 128838. https://reviews.llvm.org/D41039 Files: include/clang/AST/Decl.h include/clang/AST/DeclCXX.h include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/AST/DeclCXX

[libcxx] r321923 - Add casts to prevent narrowing warnings.

2018-01-05 Thread Billy Robert O'Neal III via cfe-commits
Author: bion Date: Fri Jan 5 18:50:03 2018 New Revision: 321923 URL: http://llvm.org/viewvc/llvm-project?rev=321923&view=rev Log: Add casts to prevent narrowing warnings. Modified: libcxx/trunk/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass

[PATCH] D40819: Implement Attribute Target MultiVersioning (Improved edition!)

2018-01-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. One other test I'd like to see is what happens if you declare a version before the first use, and define it afterwards, particularly if the version is an inline function: inline __attribute__((target("default"))) void f(); inline __attribute__((target("foo"))) void f

[PATCH] D41748: [libcxx] [test] Fix Xxx_scan tests using nonstandard things and MSVC++ warnings

2018-01-05 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter added inline comments. Comment at: test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp:33 +template +constexpr auto operator()(T x) const noexcept { +return static_cast(x + 10); Altho

[PATCH] D41751: [analyzer] [NFS] Minor refactoring of trackNullOrUndefValue

2018-01-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Neat, thank you! Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:992-993 +/// Walk through nodes until we get one that matches the statement exactly. +/// Alternately,

[libcxx] r321922 - [libcxx] [test] Remove nonstandard things and resolve warnings in Xxx_scan tests

2018-01-05 Thread Billy Robert O'Neal III via cfe-commits
Author: bion Date: Fri Jan 5 18:18:20 2018 New Revision: 321922 URL: http://llvm.org/viewvc/llvm-project?rev=321922&view=rev Log: [libcxx] [test] Remove nonstandard things and resolve warnings in Xxx_scan tests Reviewed as https://reviews.llvm.org/D41748 * These tests use function objects from

[PATCH] D41749: [analyzer] suppress nullability inference from a macro when result is used in another macro

2018-01-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. This makes sense. @dcoughlin: does this harmonize with your original intent for adding this suppression in the first place? https://reviews.llvm.org/D41749 __

[PATCH] D41748: [libcxx] [test] Fix Xxx_scan tests using nonstandard things and MSVC++ warnings

2018-01-05 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal added a comment. > I hate your compiler. Seems like a valid warning to me :) Changed predicate to one that adds 10 to each input. https://reviews.llvm.org/D41748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D41748: [libcxx] [test] Fix Xxx_scan tests using nonstandard things and MSVC++ warnings

2018-01-05 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal updated this revision to Diff 128836. BillyONeal marked 3 inline comments as done. BillyONeal added a comment. Also change predicate from identity to add_ten. https://reviews.llvm.org/D41748 Files: test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp test/std/nume

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2018-01-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D35109#968314, @baloghadamsoftware wrote: > But how to add a flag for this? Is it a flag enabled by the user or is it > automatically enabled if the checker is enabled? I guess it'd be an `-analyzer-config` flag. You can add it to the `Analyzer

[PATCH] D41800: [analyzer] Use a custom program point for the check::NewAllocator callback.

2018-01-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:2906-2907 Out << "\\lPostLValue\\l"; +else if (Loc.getAs()) + Out << "\\lPostAllocatorCall\\l"; {F5743196} Repository: rC Clang https://reviews.llvm.o

[PATCH] D41800: [analyzer] Use a custom program point for the check::NewAllocator callback.

2018-01-05 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. This addresses a TODO from https://reviews.llvm.org/D41406. I re-used `PostImplicitCall` program point when calling the new callback, but it

[PATCH] D41799: [analyzer] PtrArithChecker: Update to use check::NewAllocator

2018-01-05 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. Make use of the new callback introduced in https://reviews.llvm.org/D41406 for tracking values allocated by `operator new()` in `-analyzer-co

[PATCH] D41797: [analyzer] Suppress escape of this-pointer during construction.

2018-01-05 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. This one's easy. Under `-analyzer-config c++-allocator-inlining=true`, since https://reviews.llvm.org/D41406, we've teached `MallocChecker` t

[PATCH] D41796: [analyzer] Fix extent modeling for casted operator new values.

2018-01-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov. Herald added subscribers: cfe-commits, rnkovacs, szepet. This continues the series of fine-tuning of how everything behaves in `-analyzer-config c++-allocator-inlining=true` mode with respects to ca

[PATCH] D41795: [analyzer] Inline destructors for non-array deletes.

2018-01-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp:692-693 + if (const Stmt *DtorExpr = Dtor.getOriginExpr()) +if (const Stmt *ParentExpr = +CurLC->getParentMap().getParent(DtorExpr)) + if (const CXXDel

[PATCH] D41795: [analyzer] Inline destructors for non-array deletes.

2018-01-05 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, mehdi_amini. Similarly to how we allow (since https://reviews.llvm.org/D40560) inlining the constructor after `operator new` which isn't `ope

r321921 - Serialize the IDNS for a UsingShadowDecl rather than recomputing it.

2018-01-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jan 5 17:07:05 2018 New Revision: 321921 URL: http://llvm.org/viewvc/llvm-project?rev=321921&view=rev Log: Serialize the IDNS for a UsingShadowDecl rather than recomputing it. Attempting to recompute it are doomed to fail because the IDNS of a declaration is not necessar

[PATCH] D41575: [index] Return when DC is null in handleReference

2018-01-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping Repository: rC Clang https://reviews.llvm.org/D41575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41792: [AArch64] Add ARMv8.2-A FP16 scalar intrinsics

2018-01-05 Thread Abderrazek Zaafrani via Phabricator via cfe-commits
az created this revision. az added a reviewer: SjoerdMeijer. Herald added subscribers: kristof.beyls, javed.absar, mgorny, rengolin, aemerson. ARMv8.2-A introduces half-precision floating point data processing. This patch adds the fp16 scalar intrinsics for this architecture as described in the

[PATCH] D41733: [Driver] Suggest correctly spelled driver options

2018-01-05 Thread Brian Gesiak via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321917: [Driver] Suggest correctly spelled driver options (authored by modocache, committed by ). Changed prior to commit: https://reviews.llvm.org/D41733?vs=128736&id=128824#toc Repository: rC Clang

r321917 - [Driver] Suggest correctly spelled driver options

2018-01-05 Thread Brian Gesiak via cfe-commits
Author: modocache Date: Fri Jan 5 16:25:40 2018 New Revision: 321917 URL: http://llvm.org/viewvc/llvm-project?rev=321917&view=rev Log: [Driver] Suggest correctly spelled driver options Summary: Depends on https://reviews.llvm.org/D41732. Utilities such as `opt`, when invoked with arguments that

r321916 - When name lookup finds a non-imported declaration and looks back along the

2018-01-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jan 5 16:09:23 2018 New Revision: 321916 URL: http://llvm.org/viewvc/llvm-project?rev=321916&view=rev Log: When name lookup finds a non-imported declaration and looks back along the redecl chain for an imported declaration, make sure to check the IDNS of prior imported de

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2018-01-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I just tried this on one of our larger builds. The good news is that it appears to work: the compilation still succeeds, and significantly fewer nodes are deserialized. The bad news is that the final .cc file compilation got slower, from 42s to 86s. (There's a lot of noi

[PATCH] D41748: [libcxx] [test] Fix Xxx_scan tests using nonstandard things and MSVC++ warnings

2018-01-05 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. > The use of iota targeting vector with an int parameter > triggers warnings on MSVC++ assigning an into a unsigned char& I hate your compiler. Other than that (and the bit about identity), this looks fine to me. Comment at: test/std/numerics/nu

[PATCH] D41789: [clang-tidy] Function-scoped static variables should not trigger google-objc-global-variable-declaration

2018-01-05 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE321914: [clang-tidy] Function-scoped static variables should not trigger google-objc… (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D41789?vs=128814&id=12

[clang-tools-extra] r321914 - [clang-tidy] Function-scoped static variables should not trigger google-objc-global-variable-declaration

2018-01-05 Thread Ben Hamilton via cfe-commits
Author: benhamilton Date: Fri Jan 5 15:26:06 2018 New Revision: 321914 URL: http://llvm.org/viewvc/llvm-project?rev=321914&view=rev Log: [clang-tidy] Function-scoped static variables should not trigger google-objc-global-variable-declaration Summary: google-objc-global-variable-declaration curr

[PATCH] D41716: clang-tidy: add IgnoreMacros option to readability-inconsistent-declaration-parameter-name

2018-01-05 Thread Miklos Vajna via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321913: clang-tidy: add IgnoreMacros option to readability-inconsistent-declaration… (authored by vmiklos, committed by ). Herald added a subscriber: klimek. Changed prior to commit: https://reviews.llv

[clang-tools-extra] r321913 - clang-tidy: add IgnoreMacros option to readability-inconsistent-declaration-parameter-name

2018-01-05 Thread Miklos Vajna via cfe-commits
Author: vmiklos Date: Fri Jan 5 15:22:10 2018 New Revision: 321913 URL: http://llvm.org/viewvc/llvm-project?rev=321913&view=rev Log: clang-tidy: add IgnoreMacros option to readability-inconsistent-declaration-parameter-name And also enable it by default to be consistent with e.g. modernize-use-

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 128815. ahatanak marked an inline comment as done. ahatanak added a comment. Check whether the argument is passed indirectly before pushing the cleanup. https://reviews.llvm.org/D41039 Files: include/clang/AST/Decl.h include/clang/AST/DeclCXX.h inclu

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGCall.cpp:3498 bool HasAggregateEvalKind = hasAggregateEvaluationKind(type); + bool TypeDestructedInCallee = false; + if (const auto *RD = type->getAsCXXRecordDecl()) This is a confusing name for this fl

[PATCH] D41789: [clang-tidy] Function-scoped static variables should not trigger google-objc-global-variable-declaration

2018-01-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: Wizard, hokein, klimek. Herald added subscribers: cfe-commits, xazax.hun. google-objc-global-variable-declaration currently triggers on valid code like: - (void)foo { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ /*

[PATCH] D41788: [DeclPrinter] Fix two cases that crash clang -ast-print.

2018-01-05 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added a reviewer: arphaman. Herald added subscribers: jlebar, sanjoy. Both crashes are related to handling anonymous structures. - clang didn't handle () around an anonymous struct variable. - clang also crashed on syntax errors that could lead to other syntactic c

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked 2 inline comments as done. ahatanak added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1827 + + if (!IsScalar && !CurFuncIsThunk && + (getTarget().getCXXABI().areArgsDestroyedLeftToRightInCallee() || This is not correct since it isn't

[PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-01-05 Thread Weiming Zhao via Phabricator via cfe-commits
weimingz added a comment. We can wrap the random_device as a minstd_rand, a linear congruential enginer that a lot of C lib uses for rand(). However based on documentation, we should just provides dummy implementation which throws an exception in the constructor of random_device [1,2] But compar

[PATCH] D41546: [clang-tidy] Adding Fuchsia checker for statically constructed objects

2018-01-05 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 128806. juliehockett marked 3 inline comments as done. juliehockett added a comment. 1. Narrowing check to only warn if the declaration is a global non-trivial object with explicit static storage, unless the object either has a `constexpr` constructor o

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2018-01-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Finer grained clang stats can be seen here . https://reviews.llvm.org/D41416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D41780: Preserve unknown STDC pragma through preprocessor

2018-01-05 Thread Steven Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. steven_wu marked an inline comment as done. Closed by commit rL321909: Preserve unknown STDC pragma through preprocessor (authored by steven_wu, committed by ). Repository: rL LLVM https://reviews.llvm.org/D41780 Files:

r321909 - Preserve unknown STDC pragma through preprocessor

2018-01-05 Thread Steven Wu via cfe-commits
Author: steven_wu Date: Fri Jan 5 14:45:03 2018 New Revision: 321909 URL: http://llvm.org/viewvc/llvm-project?rev=321909&view=rev Log: Preserve unknown STDC pragma through preprocessor Summary: #pragma STDC FP_CONTRACT handler is only registered in parser so we should keep the unknown STDC pragm

[PATCH] D41780: Preserve unknown STDC pragma through preprocessor

2018-01-05 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D41780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

Re: [PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-01-05 Thread Zhao, Weiming via cfe-commits
We can wrap the random_device as a minstd_rand, a linear congruential enginer that a lot of C lib uses for rand(). However based on documentation, we should just provides dummy implementation which throws an exception in the constructor of random_device [1,2] But again, compared with run-time ex

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2018-01-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 128802. v.g.vassilev added a comment. Reduce further the deserializations from 451 to 449 by providing a more complete implementation of `ODRHash::AddTemplateArgument`. Kudos @rtrieu! https://reviews.llvm.org/D41416 Files: include/clang/AST/DeclTem

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2018-01-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 128797. v.g.vassilev added a comment. Reduce hash collisions for template specializations. Currently when we hash a tag type the visitor calls `ODRHash::AddDecl` which mostly relies on the decl name give distinct hash value. The types coming from templ

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked 3 inline comments as done. ahatanak added inline comments. Comment at: include/clang/AST/DeclCXX.h:1489-1491 + bool shouldBeDestructedInCallee() const { +return data().CanPassInRegisters && hasNonTrivialDestructor(); + } rsmith wrote: > This

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 128798. ahatanak marked an inline comment as done. https://reviews.llvm.org/D41039 Files: include/clang/AST/Decl.h include/clang/AST/DeclCXX.h include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td

r321906 - Track shadow modules with a generation counter.

2018-01-05 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Fri Jan 5 14:13:56 2018 New Revision: 321906 URL: http://llvm.org/viewvc/llvm-project?rev=321906&view=rev Log: Track shadow modules with a generation counter. This is a follow up to r321855, closing the gap between our internal shadow modules implementation and upstream. It h

[PATCH] D41785: Print the qualified name when dumping deserialized decls.

2018-01-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. v.g.vassilev added a reviewer: rsmith. This is very useful to understand and debug the lazy template specializations used in pch and modules. Repository: rC Clang https://reviews.llvm.org/D41785 Files: lib/Frontend/FrontendAction.cpp Index: lib/Fronte

[PATCH] D41780: Preserve unknown STDC pragma through preprocessor

2018-01-05 Thread Steven Wu via Phabricator via cfe-commits
steven_wu updated this revision to Diff 128794. steven_wu added a comment. Move STDC pragma handler to parser. Repository: rC Clang https://reviews.llvm.org/D41780 Files: include/clang/Basic/DiagnosticLexKinds.td include/clang/Basic/DiagnosticParseKinds.td include/clang/Parse/Parser.h

[PATCH] D40983: Generate Libclang invocation reproducers using a new -cc1gen-reproducer option

2018-01-05 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Makes sense, LGTM. Should we add documentation explaining how to use this? I'm fine if it comes in a follow up commit. https://reviews.llvm.org/D40983 __

[PATCH] D40819: Implement Attribute Target MultiVersioning (Improved edition!)

2018-01-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 128793. erichkeane added a comment. Sorry for the thrash, thought of a better way to do the test just as I clicked 'save' last time :) https://reviews.llvm.org/D40819 Files: include/clang/AST/ASTContext.h include/clang/AST/Decl.h include/clang/Bas

[PATCH] D40712: [Driver] Add flag enabling the function stack size section that was added in r319430

2018-01-05 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Thanks! LGTM https://reviews.llvm.org/D40712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D40819: Implement Attribute Target MultiVersioning (Improved edition!)

2018-01-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 128792. erichkeane added a comment. This revision is now accepted and ready to land. Added test for friend functions. https://reviews.llvm.org/D40819 Files: include/clang/AST/ASTContext.h include/clang/AST/Decl.h include/clang/Basic/Attr.td inclu

[PATCH] D41733: [Driver] Suggest correctly spelled driver options

2018-01-05 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Thanks! LGTM. Repository: rC Clang https://reviews.llvm.org/D41733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D40819: Implement Attribute Target MultiVersioning (Improved edition!)

2018-01-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane planned changes to this revision. erichkeane added a comment. Forgot friend functions, Working on it now, sorry about that. https://reviews.llvm.org/D40819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D41523: xmmintrin.h documentation fixes and updates

2018-01-05 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. The builtins are tested in tests like test/CodeGen/sse-builtins.c https://reviews.llvm.org/D41523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41523: xmmintrin.h documentation fixes and updates

2018-01-05 Thread Katya Romanova via Phabricator via cfe-commits
kromanova added a comment. In https://reviews.llvm.org/D41523#968359, @RKSimon wrote: > Sort of related - should we enable -Wdocumentation (it's currently -Wall and > -Weverything might be too much) on the respective clang builtin tests? > Doesn't have to be part of this patch. Good idea,

r321899 - Add AST dumping support for _Generic expressions.

2018-01-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jan 5 13:31:07 2018 New Revision: 321899 URL: http://llvm.org/viewvc/llvm-project?rev=321899&view=rev Log: Add AST dumping support for _Generic expressions. Modified: cfe/trunk/lib/AST/ASTDumper.cpp Modified: cfe/trunk/lib/AST/ASTDumper.cpp URL: http://llvm.org/vie

[PATCH] D41781: [DeclPrinter] Handle built-in C++ types in -ast-print.

2018-01-05 Thread Artem Belevich via Phabricator via cfe-commits
tra abandoned this revision. tra added a comment. Never mind. There must be something else going on in the case where I've discovered the crash. the test case in this patch does not really reproduce the issue by itself. :-( https://reviews.llvm.org/D41781 ___

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/DeclCXX.h:1489-1491 + bool shouldBeDestructedInCallee() const { +return data().CanPassInRegisters && hasNonTrivialDestructor(); + } This will return incorrect results on MSVC, where every class typ

[PATCH] D41764: [libcxx] [cmake] Add a config option LIBCXX_HAS_WIN32_THREADS for enforcing win32 threads

2018-01-05 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321896: [cmake] Add a config option LIBCXX_HAS_WIN32_THREAD_API for enforcing win32… (authored by mstorsjo, committed by ). Changed prior to commit: https://reviews.llvm.org/D41764?vs=128734&id=128786#

[libcxx] r321896 - [cmake] Add a config option LIBCXX_HAS_WIN32_THREAD_API for enforcing win32 threads

2018-01-05 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Fri Jan 5 12:48:29 2018 New Revision: 321896 URL: http://llvm.org/viewvc/llvm-project?rev=321896&view=rev Log: [cmake] Add a config option LIBCXX_HAS_WIN32_THREAD_API for enforcing win32 threads This allows keeping libcxx using win32 threads even if a version of pthread.h

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 128784. ahatanak added a comment. - Serialize/deserialize the bits I added to FunctionDecl and CXXRecordDecl. - Enable passing non-trivial structs when clang abi-compat version is 4.0 or lower. - Fix a bug in Sema::CheckCompletedCXXClass where the CXXRecordD

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Sorry, the patch I've just uploaded was missing some changes I made. https://reviews.llvm.org/D41039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 128781. https://reviews.llvm.org/D41039 Files: include/clang/AST/Decl.h include/clang/AST/DeclCXX.h include/clang/AST/Type.h include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Se

[PATCH] D41750: Fix TLS support check for Darwin 32-bit simulator targets.

2018-01-05 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321890: Fix TLS support check for Darwin 32-bit simulator targets. (authored by vsapsai, committed by ). Changed prior to commit: https://reviews.llvm.org/D41750?vs=128696&id=128783#toc Repository: r

r321890 - Fix TLS support check for Darwin 32-bit simulator targets.

2018-01-05 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Fri Jan 5 12:20:03 2018 New Revision: 321890 URL: http://llvm.org/viewvc/llvm-project?rev=321890&view=rev Log: Fix TLS support check for Darwin 32-bit simulator targets. Also instead of checking architecture explicitly, use recently added "simulator" environment in the trip

[PATCH] D41750: Fix TLS support check for Darwin 32-bit simulator targets.

2018-01-05 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for prompt review. https://reviews.llvm.org/D41750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40819: Implement Attribute Target MultiVersioning (Improved edition!)

2018-01-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 128782. erichkeane marked 7 inline comments as done. erichkeane added a comment. Fixes for all @echristo and @rsmith s comments. https://reviews.llvm.org/D40819 Files: include/clang/AST/ASTContext.h include/clang/AST/Decl.h include/clang/Basic/Attr

[PATCH] D40819: Implement Attribute Target MultiVersioning (Improved edition!)

2018-01-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 34 inline comments as done. erichkeane added a comment. Patch incoming, sorry it took so long! Comment at: lib/CodeGen/CGBuiltin.cpp:7673 -Value *CodeGenFunction::EmitX86CpuInit() { +Value *CodeGenFunction::EmitX86CpuInit(CGBuilderTy &Builder) { llvm::Fun

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

2018-01-05 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: lib/Parse/ParseExprCXX.cpp:2906-2912 +// Basic lookahead to check if we have a lambda expression. If we +// encounter two braces with a semicolon, we can be pretty sure +// that this is a lambda, not say a compound literal

[PATCH] D41764: [libcxx] [cmake] Add a config option LIBCXX_HAS_WIN32_THREADS for enforcing win32 threads

2018-01-05 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai accepted this revision. smeenai added a comment. This revision is now accepted and ready to land. Can you add documentation for `_LIBCPP_HAS_THREAD_API_WIN32` to `docs/DesignDocs/ThreadingSupportAPI.rst`? It should have been documented before, but this seems like a good opportunity to co

[PATCH] D41780: Preserve unknown STDC pragma through preprocessor

2018-01-05 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Should be safe, I think; currently, FENV_ACCESS and CX_LIMITED_RANGE have no effect, and when we do start supporting them, we'll probably want to handle them in the parser, like we do for FP_CONTRACT. Repository: rC Clang https://reviews.llvm.org/D41780

[PATCH] D41780: Preserve unknown STDC pragma through preprocessor

2018-01-05 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. In https://reviews.llvm.org/D41780#968664, @efriedma wrote: > If you move all the #pragma STDC handlers from the lexer to the parser, you > might be able to avoid adding an explicit STDC handler in > PrintPreprocessedOutput.cpp. If it is safe to do that, I can chang

[PATCH] D41780: Preserve unknown STDC pragma through preprocessor

2018-01-05 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. If you move all the #pragma STDC handlers from the lexer to the parser, you might be able to avoid adding an explicit STDC handler in PrintPreprocessedOutput.cpp. Comment at: test/Preprocessor/pragma_unknown.c:32 #pragma STDC SO_GREAT // expected-w

[PATCH] D41326: [clang-tidy] Added diagnostics about incorrect usage of NOLINT comment

2018-01-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:839-840 +case NolintCommentType::Nolint: + Message = "there is no diagnostics on this line, " +"the NOLINT comment is redundant"; + break; ---

[PATCH] D41781: [DeclPrinter] Handle built-in C++ types in -ast-print.

2018-01-05 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added a reviewer: arphaman. Herald added subscribers: jlebar, sanjoy. Fixes a crash in clang when it crashed with -ast-print on code that contained decltype(nullptr). https://reviews.llvm.org/D41781 Files: clang/lib/AST/DeclPrinter.cpp clang/test/Sema/ast-pri

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

2018-01-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Parse/ParseExprCXX.cpp:2906-2912 +// Basic lookahead to check if we have a lambda expression. If we +// encounter two braces with a semicolon, we can be pretty sure +// that this is a lambda, not say a compound literal. +

[PATCH] D41780: Preserve unknown STDC pragma through preprocessor

2018-01-05 Thread Steven Wu via Phabricator via cfe-commits
steven_wu created this revision. steven_wu added reviewers: efriedma, rsmith, arphaman. should keep the unknown STDC pragma through preprocessor and we also should not emit warning for unknown STDC pragma during preprocessor. rdar://problem/35724351 Repository: rC Clang https://reviews.llvm.

[PATCH] D39074: [libunwind][MIPS]: Add support for unwinding in N32 processes.

2018-01-05 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb added a comment. Ok, I'm definitely fine with splitting the rename out into a separate patch. Will wait for @sdardis to be sure. https://reviews.llvm.org/D39074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D41779: [clang-tidy] Fix DanglingHandleCheck for the correct conversion operation between basic_string and basic_string_view.

2018-01-05 Thread Samuel Benzaquen via Phabricator via cfe-commits
sbenza created this revision. sbenza added a reviewer: hokein. Herald added subscribers: cfe-commits, xazax.hun, klimek. Fix DanglingHandleCheck to handle the final implementation of std::string and std::string_view. These use a conversion operator instead of a conversion constructor. Repositor

[PATCH] D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-05 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. OSS-Fuzz classifies the bug as medium severity security issue, would be great to include the fix in Clang 6.0. https://reviews.llvm.org/D41423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: include/clang/Basic/AttrDocs.td:2261 +- The class or its subobjects have Objective-C pointer type members and ARC is + enabled. + }]; rjmccall wrote: > I think the right list

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked 10 inline comments as done. ahatanak added inline comments. Comment at: include/clang/AST/DeclCXX.h:443 +/// SMF_MoveConstructor, and SMF_Destructor are meaningful here. +unsigned HasTrivialSpecialMembersForCall : 6; + rjmccall wrote: > I

[PATCH] D41740: [clang-tidy] Adding a new bugprone check for streaming objects of type int8_t or uint8_t

2018-01-05 Thread Barry Revzin via Phabricator via cfe-commits
BRevzin marked an inline comment as done. BRevzin added a comment. In https://reviews.llvm.org/D41740#968134, @JonasToth wrote: > Could you please add a test case with a template that reduces the type to > int8 or uint8? I don't actually know how to do that. I tried a few things, but getting t

[PATCH] D41740: [clang-tidy] Adding a new bugprone check for streaming objects of type int8_t or uint8_t

2018-01-05 Thread Barry Revzin via Phabricator via cfe-commits
BRevzin updated this revision to Diff 128768. BRevzin added a comment. Updates based on review comments - and rebased off of latest so as to get the ReleaseNotes right. Added options so that the user can provide the list of stream types and int typedef types, as desired, defaulting to just `b

[PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 128767. ahatanak added a comment. Address review comments. I also made changes so that FunctionDecl::IsTrivialForCall is always set to true for special functions of "trivial_abi" classes. There is still one microsoft IRGen test failing because I haven't im

[PATCH] D31417: [OpenMP] Add support for omp simd pragmas without runtime

2018-01-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. I think we can abandon this one as support for -fopenmp-simd was committed already? https://reviews.llvm.org/D31417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D41764: [libcxx] [cmake] Add a config option LIBCXX_HAS_WIN32_THREADS for enforcing win32 threads

2018-01-05 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D41764#968318, @smeenai wrote: > I think `LIBCXX_HAS_WIN32_THREAD_API` would be more consistent with the > existing configuration define names? That sounds good to me too. I can update the patch later, or before committing if it's otherwis

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-01-05 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D35110#968284, @baloghadamsoftware wrote: > This one is not blocked anymore since I removed the dependency. But I have to modify the test cases... https://reviews.llvm.org/D35110 ___

[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2018-01-05 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/Format.cpp:906-907 + } + if (!LanguageFound) +return make_error_code(ParseError::Unsuitable); + *Style = *StyleSet.Get(Language); Optional: I'd probably slightly re-structure the above to: if (!Languag

[PATCH] D41720: [clang-tidy] Add a -show-color flag.

2018-01-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D41720#968338, @alexfh wrote: > Clang supports -fcolor-diagnostics. I guess, we could use it, e.g. via > -extra-arg=-fcolor-diagnostics. On a second thought, configuring the colors using -extra-arg doesn't seem like a good solution to me. A

[PATCH] D41523: xmmintrin.h documentation fixes and updates

2018-01-05 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. Sort of related - should we enable -Wdocumentation (it's currently -Wall and -Weverything might be too much) on the respective clang builtin tests? Doesn't have to be part of this patch. Comment at: lib/Headers/xmmintrin.h:1927 /// -/// This intr

[PATCH] D40712: [Driver] Add flag enabling the function stack size section that was added in r319430

2018-01-05 Thread Sean Eveson via Phabricator via cfe-commits
seaneveson updated this revision to Diff 128745. seaneveson added a comment. Thanks Bruno, Changed the default for cc1 to be false regardless of the target. The default in the driver is still true for PS4 (only). https://reviews.llvm.org/D40712 Files: include/clang/Driver/Options.td inclu

[PATCH] D35787: [clang-tidy] Ignore vector in inefficient-vector-operation.

2018-01-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D35787#830351, @hokein wrote: > In https://reviews.llvm.org/D35787#819007, @alexfh wrote: > > > Should we look at whether the size is statically known? > > > Do you mean the size of the template type T in `vector`? STL only > provides a templa

  1   2   >