[libcxx] r307518 - Fix issues with UBSAN test configuration.

2017-07-09 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Sun Jul 9 21:32:21 2017 New Revision: 307518 URL: http://llvm.org/viewvc/llvm-project?rev=307518=rev Log: Fix issues with UBSAN test configuration. On Apple the test feature 'sanitizer-new-delete' was incorrectly getting added to the LIT feature set, which mistakenly caused

[libcxx] r307517 - Work around PR31864 - ATOMIC_LLONG_LOCK_FREE is incorrect in 32 bit builds

2017-07-09 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Sun Jul 9 21:16:50 2017 New Revision: 307517 URL: http://llvm.org/viewvc/llvm-project?rev=307517=rev Log: Work around PR31864 - ATOMIC_LLONG_LOCK_FREE is incorrect in 32 bit builds Modified: libcxx/trunk/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp

r307515 - Remove incorrect FIXME comment; the FIXME was addressed before the changes were committed

2017-07-09 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Sun Jul 9 19:59:26 2017 New Revision: 307515 URL: http://llvm.org/viewvc/llvm-project?rev=307515=rev Log: Remove incorrect FIXME comment; the FIXME was addressed before the changes were committed Modified: cfe/trunk/lib/Sema/SemaCoroutine.cpp Modified:

r307514 - Remove non-ascii characters introduced in r307513

2017-07-09 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Sun Jul 9 19:52:34 2017 New Revision: 307514 URL: http://llvm.org/viewvc/llvm-project?rev=307514=rev Log: Remove non-ascii characters introduced in r307513 Modified: cfe/trunk/lib/Sema/SemaCoroutine.cpp Modified: cfe/trunk/lib/Sema/SemaCoroutine.cpp URL:

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-09 Thread Benoit Vey via Phabricator via cfe-commits
Praetonus updated this revision to Diff 105803. Praetonus added a comment. Patch updated to adhere to the coding style based on @majnemer's comments. https://reviews.llvm.org/D35180 Files: include/clang/CodeGen/CodeGenABITypes.h lib/CodeGen/CodeGenABITypes.cpp Index:

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-09 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: lib/CodeGen/CodeGenABITypes.cpp:71 + assert(FD != nullptr && "Expected a non-null function declaration!"); + llvm::Type* T = CGM.getTypes().ConvertFunctionType(FD->getType(), FD); + Pointers lean right.

[PATCH] D35172: Keep the IdentifierInfo in the Token for alternative operator keyword

2017-07-09 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. It looks like there are fewer special cases with this direction then our present one, though I worry that they'll be less obvious. On the whole, this seems like a improvement. Comment at: lib/Lex/PPExpressions.cpp:242 switch (PeekTok.getKind()) { -

r307513 - [coroutines] Include the implicit object parameter type when looking up coroutine_traits for member functions.

2017-07-09 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Sun Jul 9 18:27:22 2017 New Revision: 307513 URL: http://llvm.org/viewvc/llvm-project?rev=307513=rev Log: [coroutines] Include the implicit object parameter type when looking up coroutine_traits for member functions. This patch was originally from Toby Allsopp, but I

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-09 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. Looks great, thanks! https://reviews.llvm.org/D35180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-09 Thread Benoit Vey via Phabricator via cfe-commits
Praetonus updated this revision to Diff 105795. Praetonus marked 3 inline comments as done. Praetonus added a comment. Patch updated. I've made the convertFreeFunctionType return null on failure. https://reviews.llvm.org/D35180 Files: include/clang/CodeGen/CodeGenABITypes.h

[libcxx] r307510 - Fix test failure to to new/delete ellisions

2017-07-09 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Sun Jul 9 15:20:07 2017 New Revision: 307510 URL: http://llvm.org/viewvc/llvm-project?rev=307510=rev Log: Fix test failure to to new/delete ellisions Modified: libcxx/trunk/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp Modified:

[PATCH] D35174: [libc++] Fix unrepresentable enum for clang-cl unstable ABI

2017-07-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Maybe using a static const variable instead of an enum would work better? `__long_mask` should never actually be ODR used so a definition for it should never actually be needed. https://reviews.llvm.org/D35174 ___

[PATCH] D35056: GCC ABI incompatibility when passing object with trivial copy ctor, trivial dtor, and non-trivial move ctor

2017-07-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thank you, I like this approach much better, and the IRGen changes seem fine to me. I'd like to defer to someone else (probably Richard) to review whether the changes to completeDefinition() are correct; I'm not up-to-date with how we handle lazy declarations.

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Hmm. Maybe it would make more sense to allow it to return null, and then add a comment explaining that it will do so if it can't lower the function type yet. https://reviews.llvm.org/D35180 ___ cfe-commits mailing list

[PATCH] D35187: [libclang] Support for querying whether an enum is scoped

2017-07-09 Thread Johann Klähn via Phabricator via cfe-commits
jklaehn created this revision. This patch allows checking whether an enum declaration is scoped through libclang and clang.cindex (Python). https://reviews.llvm.org/D35187 Files: bindings/python/clang/cindex.py bindings/python/tests/cindex/test_cursor.py include/clang-c/Index.h

[PATCH] D30946: [ScopePrinting] Added support to print full scopes of types and declarations.

2017-07-09 Thread Simon Schroeder via Phabricator via cfe-commits
schroedersi added a comment. Ping :) https://reviews.llvm.org/D30946 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35172: Keep the IdentifierInfo in the Token for alternative operator keyword

2017-07-09 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. My interaction with this is as a submitter for Melanie, so hopefully she can validate that this doesn't break anything subtle. To me it DOES seem like a good approach, however Richard likely has a better idea about it, so I want to give him a bit of time before

r307509 - [analyzer] Faster hashing of subsequences in CompoundStmts.

2017-07-09 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Sun Jul 9 14:14:36 2017 New Revision: 307509 URL: http://llvm.org/viewvc/llvm-project?rev=307509=rev Log: [analyzer] Faster hashing of subsequences in CompoundStmts. Summary: This patches improves the hashing subsequences in CompoundStmts by incrementally hashing all

[PATCH] Add warning to clang-reorder-fields when dependencies of init-list exprs are violated

2017-07-09 Thread Sam Conrad via cfe-commits
This adds a warning emitted by clang-reorder-fields when the reordering fields breaks dependencies in the initializer list (such that -Wuninitialized would warn). For example, given: Foo::Foo(int x) : a(x) , b(a) {} Reordering fields to [b,a] gives: Foo::Foo(int x) : b(a) , a(x) {}

[PATCH] D35046: [coroutines] Include "this" type when looking up coroutine_traits

2017-07-09 Thread Toby Allsopp via Phabricator via cfe-commits
toby-allsopp added a comment. In https://reviews.llvm.org/D35046#802838, @EricWF wrote: > I think the test could be improved. First could you add the test within > `test/SemaCXX/coroutines.cpp`? Second could you add some negative tests that > check the diagnostics generated when you don't

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-09 Thread Benoit Vey via Phabricator via cfe-commits
Praetonus updated this revision to Diff 105793. Praetonus added a comment. Patch updated based on @rjmccall's comments. I removed the wrapper for the ConvertType function, after giving it some thoughts I don't see any use case for it, I guess I added it by default. I left the

[PATCH] D35186: [analyzer] Add annotation for functions taking user-facing strings

2017-07-09 Thread Erik Verbruggen via Phabricator via cfe-commits
erikjv updated this revision to Diff 105792. erikjv added a comment. Sorry, now with more context in the diff. https://reviews.llvm.org/D35186 Files: lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp test/Analysis/localization-aggressive.m Index: test/Analysis/localization-aggressive.m

[PATCH] D35186: [analyzer] Add annotation for functions taking user-facing strings

2017-07-09 Thread Erik Verbruggen via Phabricator via cfe-commits
erikjv created this revision. Herald added a subscriber: xazax.hun. There was already a returns_localized_nsstring annotation to indicate that the return value could be passed to UIKit methods that would display them. However, those UIKit methods were hard-coded, and it was not possible to

[PATCH] D35184: X86 Intrinsics: _bit_scan_forward should not be under #ifdef __RDRND__

2017-07-09 Thread Zvi Rackover via Phabricator via cfe-commits
zvi updated this revision to Diff 105788. zvi added a comment. rdrand64_step should be under the ifdef https://reviews.llvm.org/D35184 Files: lib/Headers/immintrin.h test/CodeGen/bitscan-builtins.c Index: test/CodeGen/bitscan-builtins.c

[PATCH] D35184: X86 Intrinsics: _bit_scan_forward should not be under #ifdef __RDRND__

2017-07-09 Thread Zvi Rackover via Phabricator via cfe-commits
zvi added inline comments. Comment at: lib/Headers/immintrin.h:230 static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd"))) _rdrand64_step(unsigned long long *__p) { craig.topper wrote: > Looks like we now aren't removing

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Exposing these operations seems fine, but I'm not thrilled about the APIs. Of course, the APIs are exactly derived from IRGen's internal APIs, but we'd like to eventually clean those APIs up, and we certainly don't need to emulate them. Comment at:

[PATCH] D34992: Emit static constexpr member as available_externally definition

2017-07-09 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini updated this revision to Diff 105787. mehdi_amini added a comment. Fix issues around mutable fields and regression on "internal", add more testing. https://reviews.llvm.org/D34992 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/test/CodeGenCXX/cxx11-extern-constexpr.cpp

[PATCH] D35184: X86 Intrinsics: _bit_scan_forward should not be under #ifdef __RDRND__

2017-07-09 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/Headers/immintrin.h:230 static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd"))) _rdrand64_step(unsigned long long *__p) { Looks like we now aren't removing rdrand64_step.

[PATCH] D35184: X86 Intrinsics: _bit_scan_forward should not be under #ifdef __RDRND__

2017-07-09 Thread Zvi Rackover via Phabricator via cfe-commits
zvi created this revision. The _bit_scan_forward and _bit_scan_reverse intrinsics were accidentally masked under the preprocessor checks that prune intrinsics definitions for the benefit of faster compile-time on Windows. This patch moves the definitons out of that region. Fixes pr33722

[PATCH] D35082: [OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-07-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 105785. yaxunl added a comment. Treat (void*)0 as null pointer for OpenCL 1.2. Rebase to ToT. https://reviews.llvm.org/D35082 Files: include/clang/Basic/AddressSpaces.h lib/AST/ASTContext.cpp lib/AST/Expr.cpp lib/AST/ItaniumMangle.cpp

r307506 - [X86] Add __get_cpuid_count to cpuid.h. Update __get_cpuid to check the maximum level support before accessing the leaf. Rename level to leaf everywhere.

2017-07-09 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sun Jul 9 10:43:10 2017 New Revision: 307506 URL: http://llvm.org/viewvc/llvm-project?rev=307506=rev Log: [X86] Add __get_cpuid_count to cpuid.h. Update __get_cpuid to check the maximum level support before accessing the leaf. Rename level to leaf everywhere. This matches

r307507 - [X86] Add more feature flag bit defines to cpuid.h for gcc compatibility.

2017-07-09 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sun Jul 9 10:43:11 2017 New Revision: 307507 URL: http://llvm.org/viewvc/llvm-project?rev=307507=rev Log: [X86] Add more feature flag bit defines to cpuid.h for gcc compatibility. Modified: cfe/trunk/lib/Headers/cpuid.h Modified: cfe/trunk/lib/Headers/cpuid.h URL:

[libcxx] r307505 - optional: Implement LWG 2900 and P0602

2017-07-09 Thread Casey Carter via cfe-commits
Author: caseycarter Date: Sun Jul 9 10:15:49 2017 New Revision: 307505 URL: http://llvm.org/viewvc/llvm-project?rev=307505=rev Log: optional: Implement LWG 2900 and P0602 Differential Revision: https://reviews.llvm.org/D32385 Removed:

[PATCH] D32385: [libcxx] optional: Implement LWG 2900 and P0602

2017-07-09 Thread Casey Carter via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307505: optional: Implement LWG 2900 and P0602 (authored by CaseyCarter). Changed prior to commit: https://reviews.llvm.org/D32385?vs=101631=105784#toc Repository: rL LLVM

[PATCH] D34329: [clang-diff] Initial implementation.

2017-07-09 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. @johannes https://reviews.llvm.org/D34880 has landed, so feel free to propose patches to the StmtDataCollector API that would help you (e.g. to support identifiers). You can see examples how to use it in the CloneDetection.cpp (once for storing data in a

[PATCH] D35181: Defer addition of keywords to identifier table when loading AST

2017-07-09 Thread Johann Klähn via Phabricator via cfe-commits
jklaehn created this revision. In `ASTUnit::LoadFromASTFile`, the preprocesor object is set up using default-constructed `LangOptions` (which only later get populated). Then, in the constructor of `IdentifierTable`, these default-constructed `LangOptions` were used in the call to `AddKeywords`,

r307501 - [analyzer] Make StmtDataCollector part of the CloneDetection API

2017-07-09 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Sun Jul 9 08:56:39 2017 New Revision: 307501 URL: http://llvm.org/viewvc/llvm-project?rev=307501=rev Log: [analyzer] Make StmtDataCollector part of the CloneDetection API Summary: We probably want to use this useful templates in other pieces of code (e.g. the one from

[PATCH] D35056: GCC ABI incompatibility when passing object with trivial copy ctor, trivial dtor, and non-trivial move ctor

2017-07-09 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 105776. v.g.vassilev added a comment. Remove accidentally added change in SemaDecl.cpp https://reviews.llvm.org/D35056 Files: include/clang/AST/DeclCXX.h lib/AST/ASTImporter.cpp lib/AST/DeclCXX.cpp lib/CodeGen/CGCXXABI.cpp

[PATCH] D35056: GCC ABI incompatibility when passing object with trivial copy ctor, trivial dtor, and non-trivial move ctor

2017-07-09 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 105775. v.g.vassilev added a comment. Compute only once if there is a non-deleted move or copy constructor and store them in the `DefinitionData` of the `CXXRecordDecl`. https://reviews.llvm.org/D35056 Files: include/clang/AST/DeclCXX.h

[PATCH] D35082: [OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-07-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 105774. yaxunl retitled this revision from "[WIP][OpenCL] Add LangAS::opencl_private to represent private address space in AST" to "[OpenCL] Add LangAS::opencl_private to represent private address space in AST". yaxunl edited the summary of this revision.

[PATCH] D35153: Use DenseMap instead std::map for GVSummaryMapTy

2017-07-09 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D35153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2017-07-09 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In https://reviews.llvm.org/D34331#802747, @EricWF wrote: > @dexonsmith Mind if I hijack this and check in your changes to `` > with my tests? Not at all. In https://reviews.llvm.org/D34331#802821, @EricWF wrote: > @dexonsmith I'm not sure it's sane to allow

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-09 Thread Benoit Vey via Phabricator via cfe-commits
Praetonus created this revision. This change exposes the various CodeGenTypes::ConvertType functions in the public Clang API. This allows external tools using the Clang API to rely on it to generate LLVM types from C types. The precise use case that motivated this change is explained in an

[PATCH] D33842: CodeGen: Fix address space of global variable

2017-07-09 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307470: CodeGen: Fix address space of global variable (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D33842?vs=105644=105770#toc Repository: rL LLVM

[PATCH] D34927: [Bash-autocompletion] Fix a bug that -foo=bar doesn't handled properly

2017-07-09 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307478: [Bash-autocompletion] Fix a bug that -foo=bar doesn't handled properly (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D34927?vs=105208=105771#toc Repository: rL

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-07-09 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307479: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D34770?vs=105209=105772#toc Repository: rL

[PATCH] D34725: Add sample PGO integration test to cover profile annotation and inlining.

2017-07-09 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307445: Add sample PGO integration test to cover profile annotation and inlining. (authored by dehao). Repository: rL LLVM https://reviews.llvm.org/D34725 Files:

[PATCH] D34714: [MS] Don't statically initialize dllimport member function pointers

2017-07-09 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307446: [MS] Don't statically initialize dllimport member function pointers (authored by rnk). Changed prior to commit: https://reviews.llvm.org/D34714?vs=104289=105768#toc Repository: rL LLVM

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-07-09 Thread wangxin via Phabricator via cfe-commits
wangxindsb added a comment. Look forward to your review. https://reviews.llvm.org/D34275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32385: [libcxx] optional: Implement LWG 2900 and P0602

2017-07-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. I'll deal with ensuring all vendors are willing to take this ABI break (or that they avoid it). https://reviews.llvm.org/D32385 ___

[PATCH] D35158: [libcxxabi][demangler] NFC: Don't make everything a template

2017-07-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington closed this revision. erik.pilkington added a comment. Landed as r307482 & r307481, thanks! (for some reason phab wasn't automatically closing this) https://reviews.llvm.org/D35158 ___ cfe-commits mailing list

[PATCH] D33645: [analyzer] Add missing documentation for static analyzer checkers

2017-07-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I think next time we should add examples of warning messages here - not just "//warn" but how they literally may look - so that people were able to find this page, and not doxygen/github source code, when they google up their warning messages.

[PATCH] D35159: [libcxxabi][demangler] Use an AST to represent the demangled name

2017-07-09 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added inline comments. Comment at: src/cxa_demangle.cpp:87 + +class stream +{ Doc (same for non trivial APIs) Comment at: src/cxa_demangle.cpp:125 + +typedef unsigned stream_position; + Doc

[PATCH] D35175: New option that adds the DiagID enum name and index to Diagnostic output.

2017-07-09 Thread don hinton via Phabricator via cfe-commits
hintonda created this revision. This option helps locate the origin of a diagnostic message by outputing the enum name and index associated with a specific DiagID, allowing users to grep the code for the enum name directly without having to find it in the td files first. Additional ideas: 1.

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-07-09 Thread wangxin via Phabricator via cfe-commits
wangxindsb updated this revision to Diff 105760. wangxindsb marked an inline comment as done. wangxindsb added a comment. - Use the map of object to ctor/dtor to check the virtual call. - Use CXXInstanceCall and getCXXThisVal method to get the 'this' instead of getThisSVal(). - Correct some

[PATCH] D33365: [clang-tidy] misc-assertion-count: A New Check

2017-07-09 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D33365#775916, @alexfh wrote: > In https://reviews.llvm.org/D33365#775880, @lebedev.ri wrote: > > > In https://reviews.llvm.org/D33365#775860, @alexfh wrote: > > > > > I guess, this check should go to `readability` or elsewhere, but > > >

[PATCH] D35159: [libcxxabi][demangler] Use an AST to represent the demangled name

2017-07-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington marked 4 inline comments as done. erik.pilkington added inline comments. Comment at: src/cxa_demangle.cpp:44 +class string_ref +{ mehdi_amini wrote: > If this is supposed to be *the* ultimate LLVM demangler, can we follow LLVM > coding

[PATCH] D35174: [libc++] Fix unrepresentable enum for clang-cl unstable ABI

2017-07-09 Thread Ben Craig via Phabricator via cfe-commits
bcraig created this revision. When using LIBCXX_ABI_UNSTABLE=YES, clang-cl gave the following warning: P:\llvm_master\src\llvm\projects\libcxx\include\string(683,51): warning: enumerator value is not representable in the underlying type 'int' [-Wmicrosoft-enum-value] Fixed by providing a

[PATCH] D35169: Refactor DragonFly BSD toolchain driver.

2017-07-09 Thread Rimvydas via Phabricator via cfe-commits
rimvydas created this revision. Herald added a subscriber: emaste. Make it more similar to FreeBSD one to reduce differences. In preparations for later submissions. While there, add more handling of flags (including OpenMP https://reviews.llvm.org/D35129). https://reviews.llvm.org/D35169

[PATCH] D34724: [analyzer] Add MagentaHandleChecker for the Magenta kernel

2017-07-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Thanks for publishing this. It seems that your code is already huge, and you have already added a lot of workarounds for various problems (known and new) in our APIs, while it'd sound great to actually solve these problems and simplify the API to make writing checkers

[PATCH] D35172: Keep the IdentifierInfo in the Token for alternative operator keyword

2017-07-09 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart created this revision. Herald added a subscriber: klimek. The goal of this commit is to fix clang-format so it does not merge tokens when using the alternative spelling keywords. (eg: "not foo" should not become "notfoo") The problem is that Preprocessor::HandleIdentifier used to drop

[PATCH] D35170: [libcxx] Remove stray backticks from BuildingLibcxx.rst

2017-07-09 Thread Jakub Wilk via Phabricator via cfe-commits
jwilk created this revision. https://reviews.llvm.org/D35170 Files: docs/BuildingLibcxx.rst Index: docs/BuildingLibcxx.rst === --- docs/BuildingLibcxx.rst +++ docs/BuildingLibcxx.rst @@ -78,9 +78,9 @@ $ cd

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-07-09 Thread wangxin via Phabricator via cfe-commits
wangxindsb updated this revision to Diff 105737. wangxindsb added a comment. - Change the two bugtype to one. - Use the generateErrorNode() for the pure virtual call. - Change the test case for the new expression. https://reviews.llvm.org/D34275 Files:

[PATCH] D34748: [clang-diff] Fix multiple mappings.

2017-07-09 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added a comment. In https://reviews.llvm.org/D34748#802037, @arphaman wrote: > Can you provide a test that demonstrates what this change fixed/improved? My bad, it looks like this does not improve anything yet. In order to do so I will use additional heuristics for similarity, like

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-07-09 Thread wangxin via Phabricator via cfe-commits
wangxindsb updated this revision to Diff 105738. wangxindsb added a comment. - Change the two bugtype to one. - Use the generateErrorNode() for the pure virtual call. - Change the test case for the new expression. https://reviews.llvm.org/D34275 Files:

[PATCH] D35082: [WIP][OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-07-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 105733. yaxunl edited the summary of this revision. yaxunl added a comment. Add private address space qualifier to automatic variable and function parameter. Update sema tests. ToDo: drop address space when converting l-value to r-value.

[PATCH] D35159: [libcxxabi][demangler] Use an AST to represent the demangled name

2017-07-09 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added inline comments. Comment at: src/cxa_demangle.cpp:44 +class string_ref +{ If this is supposed to be *the* ultimate LLVM demangler, can we follow LLVM coding standard? https://reviews.llvm.org/D35159

[PATCH] D35046: [coroutines] Include "this" type when looking up coroutine_traits

2017-07-09 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. I think the test could be improved. First could you add the test within `test/SemaCXX/coroutines.cpp`? Second could you add some negative tests that check the diagnostics generated

[PATCH] D35159: [libcxxabi][demangler] Use an AST to represent the demangled name

2017-07-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. This patch causes `test_demangle.pass.cpp` to fail with UBSan. Standard Error: -- /home/eric/workspace/libcxxabi/src/cxa_demangle.cpp:113:44: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/string.h:47:14: note:

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

2017-07-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. > However there is another bug here. operator=(function&&) doesn't correctly > call the destructor of the functor. I'll fix that as a separate commit. Woops, I misread the diff. There is no existing bug W.R.T. missing destructor calls. https://reviews.llvm.org/D34331

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

2017-07-09 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. @dexonsmith I'm not sure it's sane to allow reentrant behavior. Could you explain why you think it is? Should the copy assignment operator allow reentrancy as well? However there

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

2017-07-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @dexonsmith Mind if I hijack this and check in your changes to `` with my tests? Comment at: libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp:1

[PATCH] D34725: Add sample PGO integration test to cover profile annotation and inlining.

2017-07-09 Thread Dehao Chen via Phabricator via cfe-commits
danielcdh reopened this revision. danielcdh added a comment. This revision is now accepted and ready to land. the patch was reverted as it breaks on certain platforms (e.g.

[PATCH] D35158: [libcxxabi][demangler] NFC: Don't make everything a template

2017-07-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. Herald added a reviewer: EricWF. This is a NFC patch to not make every parse_* function templated on Db, which makes it easier to use methods on Db because it isn't dependent anymore. This is a prerequisite to using an AST to demangle, as per this thread:

[PATCH] D35158: [libcxxabi][demangler] NFC: Don't make everything a template

2017-07-09 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. Assuming nothing in `arena<>`...`Db` actually changed (just moved), this LGTM if you split the move into a separate prep commit. https://reviews.llvm.org/D35158

[PATCH] D35153: Use DenseMap instead std::map for GVSummaryMapTy

2017-07-09 Thread Dehao Chen via Phabricator via cfe-commits
danielcdh created this revision. Herald added a subscriber: sanjoy. Frontend change for https://reviews.llvm.org/D35148 https://reviews.llvm.org/D35153 Files: lib/CodeGen/BackendUtil.cpp Index: lib/CodeGen/BackendUtil.cpp ===

[PATCH] D34725: Add sample PGO integration test to cover profile annotation and inlining.

2017-07-09 Thread David Li via Phabricator via cfe-commits
davidxl accepted this revision. davidxl added a comment. This revision is now accepted and ready to land. lgtm https://reviews.llvm.org/D34725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34714: [MS] Don't statically initialize dllimport member function pointers

2017-07-09 Thread Reid Kleckner via Phabricator via cfe-commits
rnk commandeered this revision. rnk edited reviewers, added: majnemer; removed: rnk. rnk added a comment. @majnemer will be back Monday, grabbing this. https://reviews.llvm.org/D34714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34725: Add sample PGO integration test to cover profile annotation and inlining.

2017-07-09 Thread Dehao Chen via Phabricator via cfe-commits
danielcdh updated this revision to Diff 105705. danielcdh marked an inline comment as done. danielcdh added a comment. Integrate David's comment and add new PM test. https://reviews.llvm.org/D34725 Files: test/CodeGen/Inputs/pgo-sample.prof test/CodeGen/pgo-sample.c Index:

[PATCH] D34725: Add sample PGO integration test to cover profile annotation and inlining.

2017-07-09 Thread Dehao Chen via Phabricator via cfe-commits
danielcdh added inline comments. Comment at: test/CodeGen/pgo-sample.c:28 +// of foo:bar. +// CHECK-NOT: call void @callee +void foo(int x) { davidxl wrote: > SHould this be 'CHECK-NOT: call' as bar is also inlined? There is still call to baz. Explicitly added

[PATCH] D34588: Check for _MSC_VER before define _LIBCPP_MSVCRT

2017-07-09 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. > Thinking more about this, on Windows, is there a strong reason to default to > a different libc by default on Windows? I'm mostly concerned with `-fms-extensions` + darwin, which doesn't apply to this scenario, maybe someone else knows a better answer here. > @bruno

[PATCH] D34985: Do not read the file to determine its name.

2017-07-09 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Looks like most of the users of this function are detecting whether we're in the builtins buffer. Perhaps we should have a dedicated method for that which uses something more principled than a string comparison against ""? Comment at:

[PATCH] D34955: [Basic] Detect Git submodule version in CMake

2017-07-09 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 105674. modocache edited the summary of this revision. modocache removed a subscriber: pcc. modocache added a comment. Update commit message. https://reviews.llvm.org/D34955 Files: lib/Basic/CMakeLists.txt Index: lib/Basic/CMakeLists.txt

[PATCH] D34158: to support gcc 4.8 (and newer) compatibility on Linux, preinclude

2017-07-09 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 105671. mibintc added a comment. I updated the patch as James directed, moving the preinclude of stdc-predef.h into clang.cpp and out of the Linux toolchain entirely. I also needed to update a couple more tests in tools/extra, so I will need to update that

[PATCH] D34955: [Basic] Detect Git submodule version in CMake

2017-07-09 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 105673. modocache added a comment. Use submodule's .git directory. https://reviews.llvm.org/D34955 Files: lib/Basic/CMakeLists.txt Index: lib/Basic/CMakeLists.txt === ---

[PATCH] D33676: Place implictly declared functions at block scope

2017-07-09 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Parse/ParseStmt.cpp:843-845 + return ParseCompoundStatement(isStmtExpr, +Scope::DeclScope | Scope::CompoundStmtScope); } This seems to miss quite a lot of places that introduce

[PATCH] D33842: CodeGen: Fix address space of global variable

2017-07-09 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. Great, thanks! LGTM. https://reviews.llvm.org/D33842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35131: Prevent ClangTools from generating dependency files.D34304 created a way for ToolInvocations to conditionally generatedependency files, and updated call sites to preserve the old behav

2017-07-09 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine created this revision. ...are yet another call-path that needs updating to preserve the old behavior. https://reviews.llvm.org/D35131 Files: lib/Tooling/Tooling.cpp Index: lib/Tooling/Tooling.cpp === ---