[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-19 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 added a comment. Description of the Sema::BuildTypeTrait() Comment at: lib/AST/ASTImporter.cpp:5631 + // Value is always false. + bool ToValue = (!E->isValueDependent()) ? E->getValue() : false; + According to Sema::BuildTypeTrait() in

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-19 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 marked 3 inline comments as done. tk1012 added a comment. https://reviews.llvm.org/D39722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-19 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 updated this revision to Diff 123539. tk1012 added a comment. Herald added a subscriber: rnkovacs. Hello, Aleksei. I'm sorry for the long response time. I update the diff to follow your comments. Updates 1. I apply clang-format -style=llvm to ASTMatchers.h and ASTImporter.cpp. I don't

[PATCH] D40234: [AutoComplete] Use stronger sort predicate for autocomplete candidates to remove non-deterministic ordering

2017-11-19 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. Perhaps, this is a bit more straightforward. if (int X = A.compare_lower(B)) return X < 0; return A.compare(B) < 0; https://reviews.llvm.org/D40234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40234: [AutoComplete] Use stronger sort predicate for autocomplete candidates to remove non-deterministic ordering

2017-11-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 123538. mgrang retitled this revision from "[AutoComplete] Stable sort autocomplete candidates to remove non-deterministic ordering" to "[AutoComplete] Use stronger sort predicate for autocomplete candidates to remove non-deterministic ordering". mgrang

[PATCH] D40234: [AutoComplete] Use stronger sort predicate for autocomplete candidates to remove non-deterministic ordering

2017-11-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In https://reviews.llvm.org/D40234#929919, @ruiu wrote: > Maybe we should do case-insensitive string comparison first, and if two > strings are considered the same, try again in case-sensitive manner? > Otherwise, even though the output is now deterministic, the output

[PATCH] D40234: [AutoComplete] Stable sort autocomplete candidates to remove non-deterministic ordering

2017-11-19 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. Maybe we should do case-insensitive string comparison first, and if two strings are considered the same, try again in case-sensitive manner? Otherwise, even though the output is now deterministic, the output order is still dependent on the order of input strings.

[PATCH] D35470: [libcxx] Implement std::to_address for C++20

2017-11-19 Thread Glen Fernandes via Phabricator via cfe-commits
glenjofe updated this revision to Diff 123531. glenjofe marked 2 inline comments as done. glenjofe added a comment. Address Eric's review comments. https://reviews.llvm.org/D35470 Files: include/memory test/std/utilities/memory/pointer.conversion/to_address.pass.cpp Index:

[PATCH] D40234: [AutoComplete] Stable sort autocomplete candidates to remove non-deterministic ordering

2017-11-19 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi accepted this revision. yamaguchi added a comment. This revision is now accepted and ready to land. LGTM, thanks! https://reviews.llvm.org/D40234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40234: [AutoComplete] Stable sort autocomplete candidates to remove non-deterministic ordering

2017-11-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. This is the order of options observed when the candidates are randomly shuffled: Run 1: cl CL cl1.1 CL1.1 cl1.2 CL1.2 cl2.0 CL2.0 Run 2: CL cl cl1.1 CL1.1 cl1.2 CL1.2 CL2.0 cl2.0 https://reviews.llvm.org/D40234

[PATCH] D40234: [AutoComplete] Stable sort autocomplete candidates to remove non-deterministic ordering

2017-11-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added a project: clang. This fixes the failure in test/Driver/autocomplete.c uncovered by https://reviews.llvm.org/D39245. https://reviews.llvm.org/D40234 Files: lib/Driver/Driver.cpp Index: lib/Driver/Driver.cpp

[PATCH] D39114: [XRay][darwin] Initial XRay in Darwin Support

2017-11-19 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris planned changes to this revision. dberris added a comment. The FDR mode calls to `clock_gettime` needs a bit more attention, let me try and isolate those before attempting to land again. https://reviews.llvm.org/D39114 ___ cfe-commits

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-19 Thread Martell Malone via Phabricator via cfe-commits
martell added inline comments. Comment at: lib/Frontend/InitPreprocessor.cpp:684 +else if (TI.getTriple().isThumb() || TI.getTriple().isARM()) + Builder.defineMacro("__ARM_DWARF_EH__"); + } mstorsjo wrote: > Won't this start setting this define also on

[PATCH] D39050: Add index-while-building support to Clang

2017-11-19 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Hi! I got a bit further in my experiment in integrating this in Clangd. I put some comments (in the first more complete revision). But since the scope of this patch changed, if you feel like we should take the discussions elsewhere, please let me know! Thanks!

[PATCH] D39114: [XRay][darwin] Initial XRay in Darwin Support

2017-11-19 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris updated this revision to Diff 123529. dberris added a comment. This revision is now accepted and ready to land. Remove some uses of clock_gettime from XRay naive mode logging and some support libraries. Up next should be the FDR mode calls to clock_gettime.

[PATCH] D35470: [libcxx] Implement std::to_address for C++20

2017-11-19 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Initially this LGTM. I'll take another pass in the morning. Comment at: include/memory:1096 template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp* Just make this

[PATCH] D35470: [libcxx] Implement std::to_address for C++20

2017-11-19 Thread Glen Fernandes via Phabricator via cfe-commits
glenjofe updated this revision to Diff 123520. glenjofe added a comment. Now implements P0653R2 which was accepted in Albuquerque. https://reviews.llvm.org/D35470 Files: include/memory test/std/utilities/memory/pointer.conversion/to_address.pass.cpp Index:

[PATCH] D40230: Add -mprefer-vector-width driver option and attribute during CodeGen.

2017-11-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. This adds a new command line option -mprefer-vector-width to specify a preferred vector width for the vectorizers. Valid values are 'none' and unsigned integers. The driver will check that it meets those constraints. Specific supported integers will be

[PATCH] D40218: [Clang] Add __builtin_launder

2017-11-19 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 123516. EricWF added a comment. - Fix argument initialization. - Make constexpr. https://reviews.llvm.org/D40218 Files: include/clang/Basic/Builtins.def include/clang/Basic/DiagnosticSemaKinds.td lib/AST/ExprConstant.cpp lib/CodeGen/CGBuiltin.cpp

[PATCH] D40218: [Clang] Add __builtin_launder

2017-11-19 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: include/clang/Basic/Builtins.def:480 BUILTIN(__builtin_thread_pointer, "v*", "nc") +BUILTIN(__builtin_launder, "v*v*", "nt") EricWF wrote: > jroelofs wrote: > > GCC's is type-generic: > > > > ``` > > #include > >

[PATCH] D40218: [Clang] Add __builtin_launder

2017-11-19 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/clang/Basic/Builtins.def:480 BUILTIN(__builtin_thread_pointer, "v*", "nc") +BUILTIN(__builtin_launder, "v*v*", "nt") jroelofs wrote: > GCC's is type-generic: > > ``` > #include > > bool is_type_generic() {

[PATCH] D40218: [Clang] Add __builtin_launder

2017-11-19 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: include/clang/Basic/Builtins.def:480 BUILTIN(__builtin_thread_pointer, "v*", "nc") +BUILTIN(__builtin_launder, "v*v*", "nt") GCC's is type-generic: ``` #include bool is_type_generic() { int v; return

[PATCH] D40228: [Target] Keep the TargetOptions feature list sorted instead of sorting during CodeGen

2017-11-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. Herald added a subscriber: nhaehnle. Currently CodeGen is calling std::sort on the features vector in TargetOptions for every function, but I don't think CodeGen should be modifying TargetOptions. This moves the sorting up to the creation/modification of

[PATCH] D40218: [Clang] Add __builtin_launder

2017-11-19 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. A test with restrict and __restrict might be interesting. https://reviews.llvm.org/D40218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40226: [CodeGen] Move Reciprocals option from TargetOptions to CodeGenOptions

2017-11-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. Based on how this is currently used I think it just belongs in CodeGenOptions. It doesn't interact with any of the other target code. https://reviews.llvm.org/D40226 Files: include/clang/Basic/TargetOptions.h include/clang/Frontend/CodeGenOptions.h

[PATCH] D24933: Enable configuration files in clang

2017-11-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 123503. sepavloff added a comment. Updated patch - Added command line option for setting directories where config files are searched for, - Fixed architecture calculation, - Option --config in config file is now diagnosed, - Output made by option -v

[PATCH] D39114: [XRay][darwin] Initial XRay in Darwin Support

2017-11-19 Thread Kuba (Brecka) Mracek via Phabricator via cfe-commits
kubamracek added a comment. Can we just not use clock_gettime on Darwin and instead use mach_absolute_time? Repository: rL LLVM https://reviews.llvm.org/D39114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40225: Add -std=c17 as a flag

2017-11-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. GCC currently supports the flags -std=c17, -std=gnu17, and -std=iso9899:2017, with the only functional difference with C11 being the value of __STDC_VERSION__. These flags are documented at: https://gcc.gnu.org/onlinedocs/gcc/Standards.html This patch adds

[PATCH] D39886: [ASTImporter] Fix wrong conflict detections for unnamed structures

2017-11-19 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. This revision is now accepted and ready to land. Hello Takafumi, I think you are correct. So, these are not unnamed structures that need conflict resolution but declarations that instantiate the type. Therefore, we can omit both

Re: [PATCH] Ensure std::getline always 0-terminates string.

2017-11-19 Thread Reimar Döffinger via cfe-commits
On Wed, Nov 15, 2017 at 11:35:56AM -0800, Volodymyr Sapsai wrote: > On Nov 12, 2017, at 12:37, Reimar Döffinger wrote: > libc++ can be built with exceptions enabled or disabled (see > LIBCXX_ENABLE_EXCEPTIONS >

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

2017-11-19 Thread Johann Klähn via Phabricator via cfe-commits
jklaehn updated this revision to Diff 123495. jklaehn added a reviewer: arphaman. jklaehn added a comment. Thanks for taking a look! I removed the constructor argument as suggested; keywords are now added in `PP.Initialize`. https://reviews.llvm.org/D35181 Files:

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-19 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/Frontend/InitPreprocessor.cpp:684 +else if (TI.getTriple().isThumb() || TI.getTriple().isARM()) + Builder.defineMacro("__ARM_DWARF_EH__"); + } Won't this start setting this define also on platforms where

[PATCH] D39027: [docs][refactor] Add a new tutorial that talks about how one can implement refactoring actions

2017-11-19 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: docs/RefactoringActionTutorial.rst:98-99 + + #include "clang/Refactoring/RefactoringActions.h" + #include "clang/Refactoring/RefactoringActionRules.h" + The includes are missing `Tooling` ->

[PATCH] D39114: [XRay][darwin] Initial XRay in Darwin Support

2017-11-19 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris reopened this revision. dberris added a comment. This revision is now accepted and ready to land. Hi @kubamracek -- do you know how to work around the lack of `clock_gettime` from the 10.11 SDK? The build bots will complain again if this lands, and it'd be a real shame if we didn't get

[libcxx] r318625 - Attempt to fix template depth test failures on older Clang versions

2017-11-19 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Sun Nov 19 01:46:34 2017 New Revision: 318625 URL: http://llvm.org/viewvc/llvm-project?rev=318625=rev Log: Attempt to fix template depth test failures on older Clang versions Modified: libcxx/trunk/utils/libcxx/test/config.py Modified:

[PATCH] D39886: [ASTImporter] Fix wrong conflict detections for unnamed structures

2017-11-19 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 added inline comments. Comment at: lib/AST/ASTImporter.cpp:1665 // they occur in the same location in the context records. if (Optional Index1 = StructuralEquivalenceContext::findUntaggedStructOrUnionIndex(

[PATCH] D39886: [ASTImporter] Fix wrong conflict detections for unnamed structures

2017-11-19 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 marked an inline comment as done. tk1012 added a comment. Fix the broken indentation. https://reviews.llvm.org/D39886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39886: [ASTImporter] Fix wrong conflict detections for unnamed structures

2017-11-19 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 updated this revision to Diff 123493. tk1012 added a comment. Herald added a subscriber: rnkovacs. Hello, I update the diff to solve the below thing. > 1. Are import conflicts for anonymous structures resolved correctly? Before I describe the updates, I want to detail the difference