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

2017-12-19 Thread Akira Hatanaka via cfe-commits
On Tue, Dec 12, 2017 at 12:12 PM, John McCall wrote: > On Tue, Dec 12, 2017 at 1:45 PM, David Blaikie wrote: > >> On Mon, Dec 11, 2017 at 5:38 PM John McCall wrote: >> >>> On Mon, Dec 11, 2017 at 6:19 PM, David Blaikie

[PATCH] D40705: [Parser] Diagnose storage classes in template parameter declarations

2017-12-19 Thread Faisal Vali via Phabricator via cfe-commits
faisalv requested changes to this revision. faisalv added a comment. This revision now requires changes to proceed. Hmm - I think i might make some tweaks to this patch (to be largely symmetric with the similar handling of invalid decl-specifiers on function parameters in

[PATCH] D41421: Eliminate a magic number. NFC.

2017-12-19 Thread Matt Davis via Phabricator via cfe-commits
mattd added a comment. Thanks Eli! I do not have commit permissions, so someone else will have to commit this on my behalf. https://reviews.llvm.org/D41421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2017-12-19 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2321 + !isa(ConvertType(Arg->getType())) && ArgI.getCoerceToType() == ConvertType(Ty) && ArgI.getDirectOffset() == 0) { rjmccall wrote: > I think the right fix

[PATCH] D41425: [darwin][driver] Warn about mismatching --version-min rather than superfluous --version-min compiler option

2017-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321145: [darwin][driver] Warn about mismatching -os-version-min rather than (authored by arphaman, committed by ). Changed prior to commit: https://reviews.llvm.org/D41425?vs=127637=127648#toc

r321145 - [darwin][driver] Warn about mismatching --version-min rather than

2017-12-19 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Dec 19 18:31:30 2017 New Revision: 321145 URL: http://llvm.org/viewvc/llvm-project?rev=321145=rev Log: [darwin][driver] Warn about mismatching --version-min rather than superfluous --version-min compiler option rdar://35813850 Differential Revision:

[PATCH] D41425: [darwin][driver] Warn about mismatching --version-min rather than superfluous --version-min compiler option

2017-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Driver/ToolChains/Darwin.cpp:1536 + Driver::GetReleaseVersion(OSVersionArgTarget->getOSVersion(), + ArgMajor, ArgMinor, ArgMicro, HadExtra) && + VersionTuple(TargetMajor,

[PATCH] D40299: [Complex] Don't use __div?c3 when building with fast-math.

2017-12-19 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel accepted this revision. hfinkel added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D40299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41425: [darwin][driver] Warn about mismatching --version-min rather than superfluous --version-min compiler option

2017-12-19 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added inline comments. Comment at: lib/Driver/ToolChains/Darwin.cpp:1536 + Driver::GetReleaseVersion(OSVersionArgTarget->getOSVersion(), + ArgMajor, ArgMinor, ArgMicro, HadExtra) && + VersionTuple(TargetMajor,

[PATCH] D41399: [CodeGen] Represent array members in new-format TBAA type descriptors

2017-12-19 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: test/CodeGen/tbaa-array.cpp:24 +// CHECK-DAG: [[TAG_A_i]] = !{[[TYPE_A:!.*]], [[TYPE_int:!.*]], i64 0, i64 4} +// CHECK-DAG: [[TAG_C_i]] = !{[[TYPE_C:!.*]], [[TYPE_int:!.*]], i64 0, i64 16} +// CHECK-DAG: [[TYPE_A]] =

[PATCH] D41417: [hwasan] Implement -fsanitize-recover=hwaddress.

2017-12-19 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis updated this revision to Diff 127642. eugenis added a comment. Tweaked a test. https://reviews.llvm.org/D41417 Files: clang/lib/CodeGen/BackendUtil.cpp compiler-rt/lib/hwasan/hwasan.cc compiler-rt/lib/hwasan/hwasan_interface_internal.h compiler-rt/lib/hwasan/hwasan_linux.cc

[PATCH] D41425: [darwin][driver] Warn about mismatching --version-min rather than superfluous --version-min compiler option

2017-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Driver/ToolChains/Darwin.cpp:1536 + Driver::GetReleaseVersion(OSVersionArgTarget->getOSVersion(), + ArgMajor, ArgMinor, ArgMicro, HadExtra) && + VersionTuple(TargetMajor,

[PATCH] D41425: [darwin][driver] Warn about mismatching --version-min rather than superfluous --version-min compiler option

2017-12-19 Thread Steven Wu via Phabricator via cfe-commits
steven_wu accepted this revision. steven_wu added a comment. Just a small suggestion. Looks good otherwise. Comment at: lib/Driver/ToolChains/Darwin.cpp:1536 + Driver::GetReleaseVersion(OSVersionArgTarget->getOSVersion(), +

[PATCH] D41425: [darwin][driver] Warn about mismatching --version-min rather than superfluous --version-min compiler option

2017-12-19 Thread Bob Wilson via Phabricator via cfe-commits
bob.wilson accepted this revision. bob.wilson added a comment. This revision is now accepted and ready to land. Eventually it would be nice to also warn about redundant -m*-version-min options, but for now I agree that it would be best to start with warning only when the options are different.

[PATCH] D41394: [CodeGen] Support generation of TBAA info in the new format

2017-12-19 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D41394#959715, @rjmccall wrote: > Rewriting some of the most basic tests would be fine. Please either use new > FileCheck lines or clone the existing tests, since we don't really know how > long this transition will last. +1 Otherwise,

[PATCH] D41421: Eliminate a magic number. NFC.

2017-12-19 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 https://reviews.llvm.org/D41421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41421: Eliminate a magic number. NFC.

2017-12-19 Thread Matt Davis via Phabricator via cfe-commits
mattd updated this revision to Diff 127641. mattd added a comment. Thanks for the suggestion Eli. Took your initial suggestion. https://reviews.llvm.org/D41421 Files: lib/Frontend/PrintPreprocessedOutput.cpp Index: lib/Frontend/PrintPreprocessedOutput.cpp

[PATCH] D41417: [hwasan] Implement -fsanitize-recover=hwaddress.

2017-12-19 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis updated this revision to Diff 127640. eugenis added a comment. Replaced booleans with enums. Added __builtin_unreachable in non-recover variants of callbacks. https://reviews.llvm.org/D41417 Files: clang/lib/CodeGen/BackendUtil.cpp compiler-rt/lib/hwasan/hwasan.cc

[PATCH] D41415: [libcxx] implement casts.

2017-12-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 127639. timshen added a comment. s/_LIBCPP_HAS_VECTOR_EXTENSION/_LIBCPP_HAS_NO_VECTOR_EXTENSION/ https://reviews.llvm.org/D41415 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp

Re: r320942 - [ASTImporter] Support importing FunctionTemplateDecl and CXXDependentScopeMemberExpr

2017-12-19 Thread Peter Collingbourne via cfe-commits
Hi, I reverted this change in r321139 because it causes a test failure on Windows. e.g. https://logs.chromium.org/v/?s=chromium%2Fbb%2Ftryserver.chromium.win%2Fwin_upload_clang%2F277%2F%2B%2Frecipes%2Fsteps%2Fpackage_clang%2F0%2Fstdout Please let me know if you have trouble reproducing. Thanks,

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2017-12-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 127638. timshen added a comment. s/_LIBCPP_HAS_VECTOR_EXTENSION/_LIBCPP_HAS_NO_VECTOR_EXTENSION/ https://reviews.llvm.org/D41376 Files: libcxx/include/__config libcxx/include/experimental/__config libcxx/include/experimental/simd

r321139 - Revert r320942, "[ASTImporter] Support importing FunctionTemplateDecl and CXXDependentScopeMemberExpr"

2017-12-19 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Tue Dec 19 17:47:08 2017 New Revision: 321139 URL: http://llvm.org/viewvc/llvm-project?rev=321139=rev Log: Revert r320942, "[ASTImporter] Support importing FunctionTemplateDecl and CXXDependentScopeMemberExpr" Caused a test failure on Windows: [ RUN ]

[PATCH] D41425: [darwin][driver] Warn about mismatching --version-min rather than superfluous --version-min compiler option

2017-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: bob.wilson, dexonsmith, steven_wu. The warning about the superfluous `--version-min` compiler option seems a little too strong right now. For now we should only warn about `--version-min` options that specify a different OS version to

[PATCH] D41424: [darwin][driver] Warn about mismatching --version-min rather than superfl

2017-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D41424 Files: lib/Driver/ToolChains/Darwin.cpp test/Driver/darwin-version.c Index: test/Driver/darwin-version.c

r321135 - [analyzer] De-duplicate path diagnostics for each exploded graph node.

2017-12-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Dec 19 17:17:53 2017 New Revision: 321135 URL: http://llvm.org/viewvc/llvm-project?rev=321135=rev Log: [analyzer] De-duplicate path diagnostics for each exploded graph node. The bugreporter::trackNullOrUndefValue() mechanism contains a system of bug reporter visitors

[PATCH] D41258: [analyzer] trackNullOrUndefValue: deduplicate path pieces for each node.

2017-12-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321135: [analyzer] De-duplicate path diagnostics for each exploded graph node. (authored by dergachev, committed by ). Repository: rC Clang https://reviews.llvm.org/D41258 Files:

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

2017-12-19 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: arphaman, kcc. Fix makes the loop in LexAngledStringLiteral more like the loops in LexStringLiteral, LexCharConstant. When we skip a character after backslash, we need to check if we reached the end of the file instead of reading the next

[PATCH] D41421: Eliminate a magic number. NFC.

2017-12-19 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Please use llvm::array_lengthof to compute the length of an array. Alternatively, there's an overload of PP.getSpelling which takes a SmallVector and returns a StringRef as a parameter; you could change this code to use it, which would remove the need for the check.

[PATCH] D41422: [libcxx] implement operators and reduction.

2017-12-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: mclow.lists, EricWF. Herald added a subscriber: sanjoy. This patch completes the implementation of simd<> and related operations. https://reviews.llvm.org/D41422 Files: libcxx/include/experimental/simd

[PATCH] D41253: [analyzer] WIP: trackNullOrUndefValue: track last store to symbolic pointers.

2017-12-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321130: [analyzer] trackNullOrUndefValue: track last store to non-variables. (authored by dergachev, committed by ). Repository: rC Clang https://reviews.llvm.org/D41253 Files:

r321130 - [analyzer] trackNullOrUndefValue: track last store to non-variables.

2017-12-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Dec 19 16:47:17 2017 New Revision: 321130 URL: http://llvm.org/viewvc/llvm-project?rev=321130=rev Log: [analyzer] trackNullOrUndefValue: track last store to non-variables. When reporting certain kinds of analyzer warnings, we use the bugreporter::trackNullOrUndefValue

r321129 - [X86] Add more CPUID bits to cpuid.h to match gcc and support icelake features.

2017-12-19 Thread Craig Topper via cfe-commits
Author: ctopper Date: Tue Dec 19 16:46:09 2017 New Revision: 321129 URL: http://llvm.org/viewvc/llvm-project?rev=321129=rev Log: [X86] Add more CPUID bits to cpuid.h to match gcc and support icelake features. Modified: cfe/trunk/lib/Headers/cpuid.h Modified: cfe/trunk/lib/Headers/cpuid.h

[PATCH] D41421: Eliminate a magic number. NFC.

2017-12-19 Thread Matt Davis via Phabricator via cfe-commits
mattd created this revision. mattd added a reviewer: bkramer. Calculate sizeof Buffer instead of using a magic value. https://reviews.llvm.org/D41421 Files: PrintPreprocessedOutput.cpp Index: PrintPreprocessedOutput.cpp ===

[PATCH] D41417: [hwasan] Implement -fsanitize-recover=hwaddress.

2017-12-19 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: compiler-rt/lib/hwasan/hwasan.cc:255 -template +template __attribute__((always_inline, nodebug)) kcc wrote: > I'd prefer enums to booleans, for better readability good idea! https://reviews.llvm.org/D41417

r321128 - [analyzer] Fix a crash during C++17 aggregate construction of base objects.

2017-12-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Dec 19 16:40:38 2017 New Revision: 321128 URL: http://llvm.org/viewvc/llvm-project?rev=321128=rev Log: [analyzer] Fix a crash during C++17 aggregate construction of base objects. Since C++17, classes that have base classes can potentially be initialized as aggregates.

[PATCH] D40841: [analyzer] Fix a crash on C++17 AST for non-trivial construction into a trivial brace initializer.

2017-12-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321128: [analyzer] Fix a crash during C++17 aggregate construction of base objects. (authored by dergachev, committed by ). Changed prior to commit: https://reviews.llvm.org/D40841?vs=125629=127624#toc

[PATCH] D41148: [libcxx] implement declarations based on P0214R7.

2017-12-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 127622. timshen added a comment. include "test_macros.h" in the tests https://reviews.llvm.org/D41148 Files: libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/test/std/experimental/simd/nothing_to_do.pass.cpp

[PATCH] D41417: [hwasan] Implement -fsanitize-recover=hwaddress.

2017-12-19 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc accepted this revision. kcc added a comment. This revision is now accepted and ready to land. LGTM with a nit Comment at: compiler-rt/lib/hwasan/hwasan.cc:255 -template +template __attribute__((always_inline, nodebug)) I'd prefer enums to booleans, for

[PATCH] D41365: [clang] Add BeforeExecute method to PrecompiledPreamble

2017-12-19 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 127619. Nebiroth marked 2 inline comments as done. Nebiroth added a comment. Modified comment Changed where BeforeExecute is called Repository: rC Clang https://reviews.llvm.org/D41365 Files: include/clang/Frontend/PrecompiledPreamble.h

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-12-19 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 127617. Nebiroth added a comment. Removed some useless inclusions Removed superfluous check when inserting data in map Moved addition to DeclarationLocations in finish() outside of DeclMacrosFinder Merged with revision 321087 (moved findDefinitions

[PATCH] D41417: [hwasan] Implement -fsanitize-recover=hwaddress.

2017-12-19 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis created this revision. eugenis added reviewers: kcc, alekseyshl. Herald added subscribers: hiraditya, kubamracek. Very similar to AddressSanitizer, with the exception of the error type encoding. https://reviews.llvm.org/D41417 Files: clang/lib/CodeGen/BackendUtil.cpp

[libcxx] r321124 - libcxx: Fix for basic_stringbuf::seekoff() after r320604.

2017-12-19 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Tue Dec 19 15:33:16 2017 New Revision: 321124 URL: http://llvm.org/viewvc/llvm-project?rev=321124=rev Log: libcxx: Fix for basic_stringbuf::seekoff() after r320604. As a result of this change, the basic_stringbuf constructor that takes a mode ends up leaving __hm_ set to 0,

[PATCH] D41319: libcxx: Fix for basic_stringbuf::seekoff() after r320604.

2017-12-19 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. pcc marked an inline comment as done. Closed by commit rL321124: libcxx: Fix for basic_stringbuf::seekoff() after r320604. (authored by pcc, committed by ). Changed prior to commit:

[PATCH] D41319: libcxx: Fix for basic_stringbuf::seekoff() after r320604.

2017-12-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. LGTM. I'm going to sprinkle `const` throughout this file later, but that is a drive-by thing. All the lines that start out `ptrdiff_t __hm = ` will soon be `const ptrdiff_t __hm =

[PATCH] D41372: [libcxx] Fix transform_reduce mishandling move-only types, and nonstandard macro use in tests.

2017-12-19 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal added a comment. Do you folks want me to port this test case for move-only T into libcxx? (I added this to our test harness) Note that discussion on validity is ongoing on lists. #define _SILENCE_PARALLEL_ALGORITHMS_EXPERIMENTAL_WARNING #include #include #include

[PATCH] D41319: libcxx: Fix for basic_stringbuf::seekoff() after r320604.

2017-12-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc updated this revision to Diff 127609. pcc added a comment. - Make __hm const https://reviews.llvm.org/D41319 Files: libcxx/include/sstream libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/seekoff.pass.cpp Index:

[PATCH] D41406: [analyzer] Add a new checker callback, check::NewAllocator.

2017-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. TODOs for the future commits: - Constructor shouldn't cause pointer escape of the newly allocated pointer immediately after the NewAllocator callback, otherwise we ain't gonna find no leaks. Without `c++-allocator-inlining`, we only started tracking the pointer after the

[PATCH] D41405: Fix an assertion failure regression in isDesignatorAtObjectEnd for __builtin_object_size with incomplete array type in struct

2017-12-19 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: test/Sema/builtin-object-size.c:105 +void rd36094951_IAS_builtin_object_size_assertion(IncompleteArrayStruct* p) { + __builtin___strlcpy_chk (p->session[0].string, "ab", 2, __builtin_object_size(p->session[0].string, 1)); +}

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

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Index/IndexUnitDataConsumer.h:1 +//===--- IndexUnitDataConsumer.h - Abstract index unit data consumer ---===// +// ioeric wrote: > IIUC, this is the index data for a translation unit, as

[PATCH] D39462: [Sema] Implement -Wmaybe-tautological-constant-compare for when the tautologicalness is data model dependent

2017-12-19 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. I posted to cfe-dev: http://lists.llvm.org/pipermail/cfe-dev/2017-December/056450.html Repository: rL LLVM https://reviews.llvm.org/D39462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks a lot for further cleaning up the patch! It is now much easier to review. I really appreciate it! Some more comments on the public APIs and the layering of classes. There are a lot of helper classes in the implementation, so I think it's important to get a clear

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

2017-12-19 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 127606. v.g.vassilev added a reviewer: rtrieu. v.g.vassilev added a comment. Fixed a comment typo. Repository: rL LLVM https://reviews.llvm.org/D41416 Files: include/clang/AST/DeclTemplate.h lib/AST/DeclTemplate.cpp

[PATCH] D35755: [Solaris] gcc toolchain handling revamp

2017-12-19 Thread James Y Knight via Phabricator via cfe-commits
jyknight accepted this revision. jyknight added a comment. This revision is now accepted and ready to land. This looks reasonable on the face of it. I'm assuming you know the layout for Solaris, and it doesn't seem to change the behavior of non-Solaris, so LGTM.

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

2017-12-19 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. v.g.vassilev added reviewers: rsmith, bruno. Currently, we load all lazy template specializations when we search whether there is a suitable template specialization for a template. This is especially suboptimal with modules. If module `B` specializes a

[PATCH] D41319: libcxx: Fix for basic_stringbuf::seekoff() after r320604.

2017-12-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: libcxx/include/sstream:580 return pos_type(-1); +ptrdiff_t __hm = __hm_ == nullptr ? 0 : __hm_ - __str_.data(); off_type __noff; This can be const. https://reviews.llvm.org/D41319

[PATCH] D41415: [libcxx] implement casts.

2017-12-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: mclow.lists, EricWF. Herald added a subscriber: sanjoy. This patch also changed all simd size-related types to size_t. Before the change, as P0214 proposed, they are half-int, half-size_t in different places. The inconsistency of size types

[PATCH] D40939: [analyzer] NFC: Avoid element regions of void type.

2017-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I guess i'd commit it together with https://reviews.llvm.org/D41250 in a single commit, so that there obviously were tests. https://reviews.llvm.org/D40939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r321116 - Add explicit break (PR35700).

2017-12-19 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Tue Dec 19 14:21:48 2017 New Revision: 321116 URL: http://llvm.org/viewvc/llvm-project?rev=321116=rev Log: Add explicit break (PR35700). Modified: cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp Modified: cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp URL:

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-12-19 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked 8 inline comments as done. Nebiroth added inline comments. Comment at: clangd/ClangdUnit.cpp:85 + +if (SourceMgr.getMainFileID() == SourceMgr.getFileID(FilenameRange.getAsRange().getBegin()) && SourceMgr.isInMainFile(FilenameRange.getAsRange().getBegin()))

r321115 - Silence a bunch of implicit fallthrough warnings

2017-12-19 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Tue Dec 19 14:06:11 2017 New Revision: 321115 URL: http://llvm.org/viewvc/llvm-project?rev=321115=rev Log: Silence a bunch of implicit fallthrough warnings Modified: cfe/trunk/lib/AST/ASTDumper.cpp cfe/trunk/lib/AST/Expr.cpp cfe/trunk/lib/AST/ExprCXX.cpp

Re: [PATCH] D39622: Fix type name generation in DWARF for template instantiations with enum types and template specializations

2017-12-19 Thread David Blaikie via cfe-commits
On Tue, Dec 19, 2017 at 1:50 PM Robinson, Paul wrote: > On the lldb-dev thread I thought this was a reasonable idea > (DW_AT_linkage_name on types) but given the use-case, probably best to > confine it to classes with vtables? If there's a broader use-case it > wasn't

RE: [PATCH] D39622: Fix type name generation in DWARF for template instantiations with enum types and template specializations

2017-12-19 Thread Robinson, Paul via cfe-commits
On the lldb-dev thread I thought this was a reasonable idea (DW_AT_linkage_name on types) but given the use-case, probably best to confine it to classes with vtables? If there's a broader use-case it wasn't clear from the other thread; there it was reported that LLDB really only uses the

Re: [PATCH] D39622: Fix type name generation in DWARF for template instantiations with enum types and template specializations

2017-12-19 Thread David Blaikie via cfe-commits
Not much - I've put them on this part of the thread specifically to raise attention. If it doesn't get visibility here, maybe a cfe-dev thread would be good. On Tue, Dec 19, 2017 at 1:33 PM Anton Gorenkov wrote: > Sorry, I am quite new to the process. It seems, Adrian and

Re: [PATCH] D39622: Fix type name generation in DWARF for template instantiations with enum types and template specializations

2017-12-19 Thread Anton Gorenkov via cfe-commits
Sorry, I am quite new to the process. It seems, Adrian and Paul are in the reviewers/subscribers list to the original review (https://reviews.llvm.org/D39622). Should I do something else? 19.12.2017 23:06, David Blaikie wrote: Yep, could be worth having a conversation with the GDB folks and/or

[PATCH] D41405: Fix an assertion failure regression in isDesignatorAtObjectEnd for __builtin_object_size with incomplete array type in struct

2017-12-19 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv accepted this revision. george.burgess.iv added a comment. This revision is now accepted and ready to land. LGTM assuming my nit gets addressed. Thank you! > Maybe someone who's more familiar with this builtin could point to the cause > of this discrepancy Yeah, the

[PATCH] D41412: [libcxx] implement concat() and split()

2017-12-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: mclow.lists, EricWF. Herald added a subscriber: sanjoy. This patch implements the extended version (see P0820) of P0214 concat() and split(). https://reviews.llvm.org/D41412 Files: libcxx/include/experimental/simd

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2017-12-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked 2 inline comments as done. ahatanak added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:315 +} + } } ahatanak wrote: > rjmccall wrote: > > ahatanak wrote: > > > rjmccall wrote: > > > > Do these functions have a memcpy as a

Re: [PATCH] D39622: Fix type name generation in DWARF for template instantiations with enum types and template specializations

2017-12-19 Thread David Blaikie via cfe-commits
Yep, could be worth having a conversation with the GDB folks and/or at least poke the other LLVM debug info folks (Adrian and Paul - Paul's pretty interesting since he works with/on another (not LLDB nor GDB) debugger which would have to think about this

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2017-12-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked 2 inline comments as done. ahatanak added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:315 +} + } } rjmccall wrote: > ahatanak wrote: > > rjmccall wrote: > > > Do these functions have a memcpy as a precondition? I would expect

[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-19 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE321106: [clangd] Dont use the optional severity when comparing Diagnostic. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D41280?vs=127586=127595#toc

[clang-tools-extra] r321106 - [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-19 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Dec 19 12:52:56 2017 New Revision: 321106 URL: http://llvm.org/viewvc/llvm-project?rev=321106=rev Log: [clangd] Don't use the optional "severity" when comparing Diagnostic. Summary: We use Diagnostic as a key to find the corresponding FixIt when we do the "apply-fix",

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2017-12-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 127591. ahatanak added a comment. Address review comments. Changed the mangling of special functions to make it a bit easier to read. https://reviews.llvm.org/D41228 Files: docs/LanguageExtensions.rst include/clang/AST/Decl.h

[PATCH] D40478: Added control flow architecture protection Flag

2017-12-19 Thread Oren Ben Simhon via Phabricator via cfe-commits
oren_ben_simhon updated this revision to Diff 127590. oren_ben_simhon added a reviewer: pcc. oren_ben_simhon added a comment. Implemented comments posted until 12/19 (Thanks Craig) Repository: rL LLVM https://reviews.llvm.org/D40478 Files: include/clang/Driver/Options.td

[PATCH] D40478: Added control flow architecture protection Flag

2017-12-19 Thread Oren Ben Simhon via Phabricator via cfe-commits
oren_ben_simhon marked an inline comment as done. oren_ben_simhon added inline comments. Comment at: lib/CodeGen/CodeGenFunction.cpp:876 // Apply xray attributes to the function (as a string, for now) - if (D && ShouldXRayInstrumentFunction()) { + bool InstrumentXray =

[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 127586. hokein marked an inline comment as done. hokein added a comment. Fix typos. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41280 Files: clangd/ClangdLSPServer.h clangd/Protocol.h Index: clangd/Protocol.h

[PATCH] D40295: -fsanitize=vptr warnings on bad static types in dynamic_cast and typeid

2017-12-19 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. I don't think any checks can be skipped in the newly-introduced calls to EmitTypeCheck. Clang uses EmitDynamicCast on arbitrary addresses, not just addresses which are known to be checked for alignment/etc. Regarding the test update, I think it makes sense to extend the

[PATCH] D41076: [driver][darwin] Set the 'simulator' environment when it's specified in '-target'

2017-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321102: [driver][darwin] Set the simulator environment when its specified (authored by arphaman, committed by ). Repository: rC Clang https://reviews.llvm.org/D41076 Files:

r321102 - [driver][darwin] Set the 'simulator' environment when it's specified

2017-12-19 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Dec 19 11:56:14 2017 New Revision: 321102 URL: http://llvm.org/viewvc/llvm-project?rev=321102=rev Log: [driver][darwin] Set the 'simulator' environment when it's specified in '-target' rdar://35742458 Differential Revision: https://reviews.llvm.org/D41076 Modified:

[PATCH] D41409: [analyzer] Fix intermediate diagnostics on paths that go through operator new().

2017-12-19 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. When operator new() is inlined, diagnostic pieces may appear within it. They'd be surrounded by `Calling 'operator new'` and `Returning from

[PATCH] D41408: [analyzer] NFC: Fix nothrow operator new definition in a test.

2017-12-19 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. Fun C++ fact: definition void *operator new(std::size_t size, std::nothrow_t ) throw() { ... } does not override the global nothrow

[PATCH] D41406: [analyzer] Add a new checker callback, check::NewAllocator.

2017-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 127579. NoQ added a comment. - Actually call the new callback when the allocator call is inlined. - Update checker documentation :) https://reviews.llvm.org/D41406 Files: include/clang/StaticAnalyzer/Core/Checker.h

[PATCH] D39462: [Sema] Implement -Wmaybe-tautological-constant-compare for when the tautologicalness is data model dependent

2017-12-19 Thread Brian Cain via Phabricator via cfe-commits
bcain added a comment. In https://reviews.llvm.org/D39462#959822, @phosek wrote: > FWIW we've already rolled Clang that contains > `-Wtautological-constant-compare` to our codebase and we had to set > `-Wno-tautological-constant-compare` globally because we were getting bogus > warnings in

Re: r313729 - Implement C++ [basic.link]p8.

2017-12-19 Thread Alex L via cfe-commits
Hi Richard, This commit has caused a new regression in Clang which causes an assertion failure for extern "C" function definitions whose return type is a pointer to a record. I filed https://bugs.llvm.org/show_bug.cgi?id=35697 which contains the minimized test case for this issue. Do you mind

[PATCH] D41406: [analyzer] Add a new checker callback, check::NewAllocator.

2017-12-19 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 a subscriber: rnkovacs. This patch is roughly based on the discussion we've had in http://lists.llvm.org/pipermail/cfe-dev/2017-December/056314.html about how our support for

r321099 - [driver][darwin] Take the OS version specified in "-target" as the target

2017-12-19 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Dec 19 11:05:04 2017 New Revision: 321099 URL: http://llvm.org/viewvc/llvm-project?rev=321099=rev Log: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment The OS version is specified in -target

[PATCH] D40998: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment

2017-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC321099: [driver][darwin] Take the OS version specified in -target as the target (authored by arphaman, committed by ).

[PATCH] D39462: [Sema] Implement -Wmaybe-tautological-constant-compare for when the tautologicalness is data model dependent

2017-12-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. FWIW we've already rolled Clang that contains `-Wtautological-constant-compare` to our codebase and we had to set `-Wno-tautological-constant-compare` globally because we were getting bogus warnings in many places, similarly to https://reviews.llvm.org/D41368. If that

[PATCH] D41405: Fix an assertion failure regression in isDesignatorAtObjectEnd for __builtin_object_size with incomplete array type in struct

2017-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Note that even though there is a discrepancy between GCC and Clang, this patch does not change Clang's behavior in this instance as it emitted -1 previously as well Repository: rC Clang https://reviews.llvm.org/D41405

[PATCH] D41405: Fix an assertion failure regression in isDesignatorAtObjectEnd for __builtin_object_size with incomplete array type in struct

2017-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: vsapsai, rsmith, george.burgess.iv. The commit r316245 introduced a regression that causes an assertion failure when Clang tries to cast an `IncompleteArrayType` to a `PointerType` when evaluating __builtin_object_size in this sample:

[PATCH] D41387: Remove llvm::MemoryBuffer const_casts

2017-12-19 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Seems good Repository: rC Clang https://reviews.llvm.org/D41387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2017-12-19 Thread Nathan Hawes via Phabricator via cfe-commits
nathawes updated this revision to Diff 127568. nathawes added a comment. Fix out of data header comment in FileIndexData.h https://reviews.llvm.org/D39050 Files: include/clang/Basic/AllDiagnostics.h include/clang/Basic/CMakeLists.txt include/clang/Basic/Diagnostic.td

[PATCH] D41266: [analyzer] With c++-allocator-inlining, fix memory space for operator new pointers.

2017-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 127560. NoQ added a comment. Rebase. Remove the redundant cast that is done in `c++-allocator-inlining` mode when modeling array new. After rebase it started causing two identical element regions top appear on top of each other.

[PATCH] D41250: [analyzer] Model implied cast around operator new().

2017-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 127549. NoQ added a comment. Rebase. > I also noticed that `evalCast` from `void *` to `T *` is uncomfortable to use > because sometimes it transforms `{$x}` into `{T, 0S32b, > SymRegion{$x}}` even when `$x` is already of type `T *`. The form > `{$x}` seems

[PATCH] D41394: [CodeGen] Support generation of TBAA info in the new format

2017-12-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Rewriting some of the most basic tests would be fine. Please either use new FileCheck lines or clone the existing tests, since we don't really know how long this transition will last. Repository: rL LLVM https://reviews.llvm.org/D41394

[clang-tools-extra] r321094 - [clangd] Supress a log warning by putting it behind a condition.

2017-12-19 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Dec 19 10:10:32 2017 New Revision: 321094 URL: http://llvm.org/viewvc/llvm-project?rev=321094=rev Log: [clangd] Supress a log warning by putting it behind a condition. Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp Modified:

[PATCH] D40939: [analyzer] Avoid element regions of void type.

2017-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a subscriber: lebedev.ri. NoQ added a comment. @lebedev.ri wrote: > No tests? This patch adds an assertion => Multiple existing tests immediately starts crashing => This patch fixes the crashes with the new functionality. So in my understanding the new assertion is all the tests we

[clang-tools-extra] r321092 - [clangd] Build dynamic index and use it for code completion.

2017-12-19 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Dec 19 10:00:37 2017 New Revision: 321092 URL: http://llvm.org/viewvc/llvm-project?rev=321092=rev Log: [clangd] Build dynamic index and use it for code completion. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, ilya-biryukov, cfe-commits Differential

[PATCH] D41289: [clangd] Build dynamic index and use it for code completion.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE321092: [clangd] Build dynamic index and use it for code completion. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D41289?vs=127554=127555#toc Repository:

[PATCH] D41289: [clangd] Build dynamic index and use it for code completion.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127554. ioeric marked 4 inline comments as done. ioeric added a comment. - Address review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41289 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h

[PATCH] D41289: [clangd] Build dynamic index and use it for code completion.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the quick review! Comment at: clangd/ClangdUnit.cpp:617 + new CppFile(FileName, std::move(Command), StorePreamblesInMemory, + std::move(PCHs), std::move(ASTCallback))); } sammccall wrote: > CppFile

  1   2   >