r337525 - Document -fobjc-weak as an extension.

2018-07-19 Thread John McCall via cfe-commits
Author: rjmccall Date: Thu Jul 19 22:40:12 2018 New Revision: 337525 URL: http://llvm.org/viewvc/llvm-project?rev=337525=rev Log: Document -fobjc-weak as an extension. Fixes rdar://24091053. Modified: cfe/trunk/docs/LanguageExtensions.rst Modified: cfe/trunk/docs/LanguageExtensions.rst

r337524 - Fix and improve the ARC spec's wording about unmanaged objects.

2018-07-19 Thread John McCall via cfe-commits
Author: rjmccall Date: Thu Jul 19 22:40:09 2018 New Revision: 337524 URL: http://llvm.org/viewvc/llvm-project?rev=337524=rev Log: Fix and improve the ARC spec's wording about unmanaged objects. Modified: cfe/trunk/docs/AutomaticReferenceCounting.rst Modified:

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-19 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. ./tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -clang-tidy-binary ../llvm.rel/bin/clang-tidy -checks="-*,readability-magic-numbers" -j 12 -p ../llvm.rel -j 12 -quiet > /tmp/llvm.magic grep "warning:" /tmp/llvm.magic | cut -d: -f5 | cut -d" " -f2 |

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, ikudrin. With this change compiler generates alignment checks for wider range of types. Previously such checks were generated only for the record types with non-trivial default constructor. So the types like: struct

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-19 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 156425. 0x8000- added a comment. Filter out synthetic integers (such as _LINE_) from the report. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49114 Files: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp

[PATCH] D49083: [HIP] Register/unregister device fat binary only once

2018-07-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 156424. yaxunl marked an inline comment as done. yaxunl added a comment. Revised by John's comments. https://reviews.llvm.org/D49083 Files: lib/CodeGen/CGCUDANV.cpp test/CodeGenCUDA/device-stub.cu Index: test/CodeGenCUDA/device-stub.cu

[PATCH] D41754: [CMake] Collect target names in the global LLVM_RUNTIMES property

2018-07-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek abandoned this revision. phosek added a comment. Herald added a subscriber: ldionne. Replaced by https://reviews.llvm.org/D49587. Repository: rCXXA libc++abi https://reviews.llvm.org/D41754 ___ cfe-commits mailing list

[PATCH] D41753: [CMake] Collect target names in the global LLVM_RUNTIMES property

2018-07-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek abandoned this revision. phosek added a comment. Replaced by https://reviews.llvm.org/D49587. Repository: rUNW libunwind https://reviews.llvm.org/D41753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41755: [CMake] Collect target names in the global LLVM_RUNTIMES property

2018-07-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek abandoned this revision. phosek added a comment. Herald added a subscriber: ldionne. Replaced by https://reviews.llvm.org/D49587. Repository: rCXX libc++ https://reviews.llvm.org/D41755 ___ cfe-commits mailing list

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-19 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 156422. 0x8000- added a comment. Add a (presently failing) test for not tripping up on __LINE__ through several layers of macro expansion (as in GoogleTest library). This creates a lot of false positives in the unit tests and needs to be fixed.

[PATCH] D49083: [HIP] Register/unregister device fat binary only once

2018-07-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:578 + DtorBuilder.CreateStore(Zero, GpuBinaryAddr); + DtorBuilder.CreateBr(ExitBlock); +DtorBuilder.SetInsertPoint(ExitBlock); rjmccall

[libcxx] r337520 - Fix two test failures in

2018-07-19 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Thu Jul 19 18:51:48 2018 New Revision: 337520 URL: http://llvm.org/viewvc/llvm-project?rev=337520=rev Log: Fix two test failures in First, didn't correctly guard against min/max macros. This adds the proper push/pop macro guards. Second, an internal time helper had been

[libcxx] r337519 - Use _LIBCPP_UNREACHABLE to convince GCC that non-void functions actually always return

2018-07-19 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Thu Jul 19 18:44:33 2018 New Revision: 337519 URL: http://llvm.org/viewvc/llvm-project?rev=337519=rev Log: Use _LIBCPP_UNREACHABLE to convince GCC that non-void functions actually always return Modified: libcxx/trunk/include/experimental/filesystem

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: libcxx/lib/CMakeLists.txt:269 +AND (TARGET cxxabi_static OR HAVE_LIBCXXABI)) +#if ((TARGET ${LIBCXX_CXX_ABI_LIBRARY}) OR +#(${LIBCXX_CXX_ABI_LIBRARY} MATCHES "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI))

[PATCH] D49568: [analyzer][WIP] Scan the program state map in the visitor only once in DanglingInternalBufferChecker

2018-07-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Oh, this FIXME, i almost forgot about that. Not sure if we should focus on this now because it's kinda premature optimization, especially after @george.karpenkov has fixed a large performance problem that caused `VisitNode` to be called like ~30 times more often than

[PATCH] D49584: [CMake] Install C++ ABI headers into the right location

2018-07-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: ldionne, EricWF. Herald added subscribers: cfe-commits, christof, mgorny. This is a follow-up to r335809 and r337118. While libc++ headers are now installed into the right location in both standard as well as multiarch runtimes layout,

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 156416. phosek marked 8 inline comments as done. Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D49502 Files: libcxx/CMakeLists.txt libcxx/cmake/Modules/HandleLibCXXABI.cmake libcxx/lib/CMakeLists.txt

[libcxx] r337517 - cleanup test assertion inside library

2018-07-19 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Thu Jul 19 18:25:06 2018 New Revision: 337517 URL: http://llvm.org/viewvc/llvm-project?rev=337517=rev Log: cleanup test assertion inside library Modified: libcxx/trunk/src/experimental/filesystem/operations.cpp Modified:

[PATCH] D49570: [analyzer] Improve warning messages and notes of DanglingInternalBufferChecker

2018-07-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/DanglingInternalBufferChecker.cpp:253 + allocation_state::getContainerObjRegion(N->getState(), PtrToBuf); + const auto *TypedRegion = dyn_cast(ObjRegion); + QualType ObjTy = TypedRegion->getValueType();

[PATCH] D49553: [analyzer] Rename DanglingInternalBufferChecker to InnerPointerChecker

2018-07-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D49553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D49303: [CodeGen][ObjC] Treat non-escaping blocks as global blocks to make copy/dispose a no-op

2018-07-19 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. Thanks. A couple tiny things and then LGTM. Comment at: docs/Block-ABI-Apple.rst:69 +// block is a no-op, which is exactly how global blocks are handled. + +

[PATCH] D49294: Sema: Fix explicit address space cast in C++

2018-07-19 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. Thanks, looks good. https://reviews.llvm.org/D49294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D49083: [HIP] Register/unregister device fat binary only once

2018-07-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:466 + CtorBuilder.CreateStore(RegisterFatbinCall, GpuBinaryAddr); + CtorBuilder.CreateBr(ExitBlock); +CtorBuilder.SetInsertPoint(ExitBlock); I meant more putting all the code for

[PATCH] D49109: Borrow visibility from __fundamental_type_info for generated fundamental type infos

2018-07-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc requested changes to this revision. pcc added a comment. This revision now requires changes to proceed. Sorry, I noticed that this patch is missing a test case. Can you add one please? https://reviews.llvm.org/D49109 ___ cfe-commits mailing

[PATCH] D49109: Borrow visibility from __fundamental_type_info for generated fundamental type infos

2018-07-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D49109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D49580: [WIP] Change clang-format to absolute indentation

2018-07-19 Thread Arnaud Coomans via Phabricator via cfe-commits
acoomans added a comment. An alternative to changing the whole behavior would be to make it a parameter / configuration option. Repository: rC Clang https://reviews.llvm.org/D49580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D49580: [WIP] Change clang-format to absolute indentation

2018-07-19 Thread Arnaud Coomans via Phabricator via cfe-commits
acoomans created this revision. Herald added a subscriber: cfe-commits. When running clang-format on specific lines, two types of indentation could be expectedi: - absolute indentation: the indentation one would get if the whole file were formatted; or - relative indentation: keep the

[PATCH] D49303: [CodeGen][ObjC] Treat non-escaping blocks as global blocks to make copy/dispose a no-op

2018-07-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 156404. ahatanak marked 2 inline comments as done. ahatanak added a comment. Add a comment that explains the meaning of BLOCK_IS_NOESCAPE to the docs. Rename function needsCopyDispose to needsCopyDisposeHelpers. Repository: rC Clang

[PATCH] D49274: [CUDA] Provide integer SIMD functions for CUDA-9.2

2018-07-19 Thread Artem Belevich via Phabricator via cfe-commits
tra marked 2 inline comments as done. tra added a comment. Ben, PTAL. Comment at: clang/lib/Headers/__clang_cuda_device_functions.h:1080 + unsigned int r; + asm("vabsdiff2.u32.u32.u32.sat %0,%1,%2,0;" : "=r"(r) : "r"(__a), "r"(__b)); + return r; bkramer

[PATCH] D49294: Sema: Fix explicit address space cast in C++

2018-07-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 156403. yaxunl marked 5 inline comments as done. yaxunl added a comment. Revised by John's comments. https://reviews.llvm.org/D49294 Files: lib/Sema/SemaCast.cpp lib/Sema/SemaOverload.cpp test/CodeGenCXX/address-space-cast.cpp Index:

[PATCH] D49274: [CUDA] Provide integer SIMD functions for CUDA-9.2

2018-07-19 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 156397. tra added a comment. Fixed the issues pointed out by bkramer@. Apparently. sat does not matter for vabsdiff instruction with unsigned operands. My tests were also missing __vabsssN. https://reviews.llvm.org/D49274 Files:

[PATCH] D49109: Borrow visibility from __fundamental_type_info for generated fundamental type infos

2018-07-19 Thread Tom Anderson via Phabricator via cfe-commits
thomasanderson updated this revision to Diff 156399. thomasanderson marked 5 inline comments as done. https://reviews.llvm.org/D49109 Files: lib/CodeGen/ItaniumCXXABI.cpp Index: lib/CodeGen/ItaniumCXXABI.cpp === ---

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-19 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 156392. 0x8000- added a comment. Small refactoring and documentation update. Revert built-in acceptable integers to -1, 0 and 1 and document them. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49114 Files:

[PATCH] D49274: [CUDA] Provide integer SIMD functions for CUDA-9.2

2018-07-19 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 156386. tra added a comment. Fixed inline asm syntax. Added workaround for the bug in __vmaxs2() discovered during testing(). I've got set of tests for these functions that I'll add to test-suite shortly. AFAICT this implementation matches nvidia's bit-to-bit.

r337508 - Fix typo causing assert in self-host.

2018-07-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jul 19 16:24:41 2018 New Revision: 337508 URL: http://llvm.org/viewvc/llvm-project?rev=337508=rev Log: Fix typo causing assert in self-host. Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp cfe/trunk/test/CodeGen/init.c Modified:

[PATCH] D49083: [HIP] Register/unregister device fat binary only once

2018-07-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 156383. yaxunl marked 3 inline comments as done. yaxunl added a comment. Revised by John's comments. https://reviews.llvm.org/D49083 Files: lib/CodeGen/CGCUDANV.cpp test/CodeGenCUDA/device-stub.cu Index: test/CodeGenCUDA/device-stub.cu

[PATCH] D49083: [HIP] Register/unregister device fat binary only once

2018-07-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 5 inline comments as done. yaxunl added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:444 +auto HandleValue = +CtorBuilder.CreateAlignedLoad(GpuBinaryHandle, CGM.getPointerAlign()); +llvm::Constant *Zero =

[PATCH] D49573: [CMake] Option to control whether shared/static library is installed

2018-07-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 156382. phosek edited subscribers, added: cfe-commits; removed: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D49573 Files: libcxx/CMakeLists.txt libcxx/lib/CMakeLists.txt libcxxabi/CMakeLists.txt libcxxabi/src/CMakeLists.txt

[PATCH] D49523: [clangd] Add support for per-file override compilation command

2018-07-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D49523#1167553, @malaperle wrote: > Interesting! We also have a need for passing compilation commands in a > context where there is no compile_commands.json, but we were thinking of > putting this in a "didChangeConfiguration" message so

r337505 - [docs] Correct -fvisibility-inlines-hidden description

2018-07-19 Thread Fangrui Song via cfe-commits
Author: maskray Date: Thu Jul 19 15:45:41 2018 New Revision: 337505 URL: http://llvm.org/viewvc/llvm-project?rev=337505=rev Log: [docs] Correct -fvisibility-inlines-hidden description Modified: cfe/trunk/docs/ClangCommandLineReference.rst cfe/trunk/include/clang/Driver/Options.td

[PATCH] D49148: [DEBUGINFO] Disable unsupported debug info options for NVPTX target.

2018-07-19 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. Getting close, one inline comment. Comment at: lib/Driver/ToolChains/Cuda.h:161 bool SupportsProfiling() const override { return false; } + bool supportsDebugInfoOption(const llvm::opt::Arg *) const override { +return false;

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:211-224 + std::string ErrorMsg1; + EngineBuilder builder1(std::move(Owner1)); + builder1.setMArch(MArch); + builder1.setMCPU(getCPUStr()); + builder1.setMAttrs(getFeatureList()); +

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/CMakeLists.txt:21 + set(handle_llvm_deps) +endif() How are you doing your diff? Some of these changes are already upstream. Please rebase Comment at:

[PATCH] D49570: [analyzer] Improve warning messages and notes of DanglingInternalBufferChecker

2018-07-19 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs created this revision. rnkovacs added reviewers: NoQ, dcoughlin, xazax.hun, george.karpenkov. Herald added subscribers: mikhail.ramalho, a.sidorin, dkrupp, szepet, baloghadamsoftware, whisperity. Following the discussion at https://reviews.llvm.org/D49360. Added two more test cases that

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 156370. emmettneyman added a comment. - Fixed typo that broke build Repository: rC Clang https://reviews.llvm.org/D49526 Files: clang/tools/clang-fuzzer/CMakeLists.txt clang/tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-19 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked 3 inline comments as done. 0x8000- added inline comments. Comment at: test/clang-tidy/readability-magic-numbers.cpp:16 +void BuggyFunction() { + int BadLocalInt = 6; + // CHECK-MESSAGES: :[[@LINE-1]]:21: warning: magic number integer literal 6

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-19 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: libcxx/lib/CMakeLists.txt:269 +AND (TARGET cxxabi_static OR HAVE_LIBCXXABI)) +#if ((TARGET ${LIBCXX_CXX_ABI_LIBRARY}) OR +#(${LIBCXX_CXX_ABI_LIBRARY} MATCHES "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI))

[PATCH] D49568: [analyzer][WIP] Scan the program state map in the visitor only once in DanglingInternalBufferChecker

2018-07-19 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Yeah, I would rather have the cleanups and do extra work in the visitor. But lets wait what @NoQ thinks. Repository: rC Clang https://reviews.llvm.org/D49568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D47618: __c11_atomic_load's _Atomic can be const

2018-07-19 Thread JF Bastien via Phabricator via cfe-commits
jfb added a subscriber: yaxunl. jfb added inline comments. Comment at: lib/Sema/SemaChecking.cpp:3361 +if ((Form != Load && Form != LoadCopy && AtomTy.isConstQualified()) || AtomTy.getAddressSpace() == LangAS::opencl_constant) { Diag(DRE->getLocStart(),

[PATCH] D49476: [Index] Set OrigD before D is changed.

2018-07-19 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi accepted this revision. akyrtzi added a comment. This revision is now accepted and ready to land. Good enough, thanks for looking into this! Repository: rC Clang https://reviews.llvm.org/D49476 ___ cfe-commits mailing list

r337499 - [CStringSyntaxChecker] Check strlcpy sizeof syntax

2018-07-19 Thread David Carlier via cfe-commits
Author: devnexen Date: Thu Jul 19 14:50:03 2018 New Revision: 337499 URL: http://llvm.org/viewvc/llvm-project?rev=337499=rev Log: [CStringSyntaxChecker] Check strlcpy sizeof syntax The last argument is expected to be the destination buffer size (or less). Detects if it points to destination

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 156364. emmettneyman added a comment. - Cleaned up leftover code from mmap memcpy Repository: rC Clang https://reviews.llvm.org/D49526 Files: clang/tools/clang-fuzzer/CMakeLists.txt clang/tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 156362. emmettneyman added a comment. - Switched to JIT for compilation and execution Repository: rC Clang https://reviews.llvm.org/D49526 Files: clang/tools/clang-fuzzer/CMakeLists.txt clang/tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp

[PATCH] D49568: [analyzer][WIP] Scan the program state map in the visitor only once in DanglingInternalBufferChecker

2018-07-19 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs created this revision. rnkovacs added reviewers: NoQ, xazax.hun, george.karpenkov. Herald added subscribers: mikhail.ramalho, a.sidorin, dkrupp, szepet, baloghadamsoftware, whisperity. In order to avoid scanning the map at each node in the bug reporter visitor, the `MemRegion`

r337498 - When we choose to use zeroinitializer for a trailing portion of an array

2018-07-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jul 19 14:38:56 2018 New Revision: 337498 URL: http://llvm.org/viewvc/llvm-project?rev=337498=rev Log: When we choose to use zeroinitializer for a trailing portion of an array constant, don't convert the rest into a packed struct. If an array constant has a large

[PATCH] D47154: Try to make builtin address space declarations not useless

2018-07-19 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. ping https://reviews.llvm.org/D47154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: libcxx/lib/CMakeLists.txt:269 +AND (TARGET cxxabi_static OR HAVE_LIBCXXABI)) +#if ((TARGET ${LIBCXX_CXX_ABI_LIBRARY}) OR +#(${LIBCXX_CXX_ABI_LIBRARY} MATCHES "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI))

[PATCH] D49476: [Index] Set OrigD before D is changed.

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D49476#1168604, @akyrtzi wrote: > `CXIndexDataConsumer.cpp` uses `ASTNode.OrigD`, that code is exercised when > you run `c-index-test -index-file <...>`. I'd recommend to at least check if > that command would produce a different output for

[PATCH] D49476: [Index] Set OrigD before D is changed.

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 156356. ioeric added a comment. - try to add a test case. Repository: rC Clang https://reviews.llvm.org/D49476 Files: lib/Index/IndexingContext.cpp test/Index/index-template-specialization.cpp tools/c-index-test/c-index-test.c

[PATCH] D49085: [Sema] Emit a diagnostic for an invalid dependent function template specialization

2018-07-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337497: [Sema] Diagnose an invalid dependent function template specialization (authored by epilk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r337497 - [Sema] Diagnose an invalid dependent function template specialization

2018-07-19 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Thu Jul 19 13:40:20 2018 New Revision: 337497 URL: http://llvm.org/viewvc/llvm-project?rev=337497=rev Log: [Sema] Diagnose an invalid dependent function template specialization Previously, clang marked the specialization as invalid without emitting a diagnostic. This lead to

[PATCH] D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets

2018-07-19 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: lib/Driver/ToolChains/Gnu.cpp:2205-2209 + + // Deal with OpenEmbedded linux sysroots (like for arm-oe-linux-gnueabi) + // which are of the form

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-07-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a reviewer: aaron.ballman. erik.pilkington added a comment. Thanks for working on this! CCing Aaron, who is code owner for attributes. Comment at: include/clang/Basic/AttrDocs.td:3355 + let Content = [{ +The ``noderef`` attribute allows for showing a

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-07-19 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. The way in which you're checking for the problematic cases is unnecessarily expensive. Instead of performing a separate AST traversal, please detect whether you should be producing the warning directly when forming the problematic expressions. (For example, you could

[PATCH] D49085: [Sema] Emit a diagnostic for an invalid dependent function template specialization

2018-07-19 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:4111 + "candidate template ignored: %select{template is not a function template" + "|is not a member

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-19 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: docs/UndefinedBehaviorSanitizer.rst:97 + is not equal to the original value before the downcast. This kind of issues + may often be caused by an implicit integer promotions. - ``-fsanitize=integer-divide-by-zero``: Integer

[PATCH] D49085: [Sema] Emit a diagnostic for an invalid dependent function template specialization

2018-07-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:4111 + "candidate template ignored: %select{template is not a function template" + "|is not a member of the enclosing namespace}0">; rjmccall wrote: > Your

[PATCH] D49109: Borrow visibility from __fundamental_type_info for generated fundamental type infos

2018-07-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a subscriber: cfe-commits. pcc added inline comments. Comment at: lib/CodeGen/ItaniumCXXABI.cpp:3215 // Emit the standard library with external linkage. llvm::GlobalVariable::LinkageTypes Linkage; if (IsStdLib) `IsStdLib` will always be false

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-07-19 Thread Ana Pazos via Phabricator via cfe-commits
apazos updated this revision to Diff 156343. apazos added a comment. - Rebased the patch. - Udpated test case to check for IR attribute. https://reviews.llvm.org/D48412 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D49085: [Sema] Emit a diagnostic for an invalid dependent function template specialization

2018-07-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 156338. erik.pilkington added a comment. Improve the diagnostics further. https://reviews.llvm.org/D49085 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaTemplate.cpp

[PATCH] D49294: Sema: Fix explicit address space cast in C++

2018-07-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaOverload.cpp:3150 + !getLangOpts().OpenCLCPlusPlus) +return false; + yaxunl wrote: > rjmccall wrote: > > yaxunl wrote: > > > rjmccall wrote: > > > > It's not really OpenCL C++ that's special here,

[PATCH] D49508: [Sema] Expr::skipRValueSubobjectAdjustments(): record skipped NoOp casts.

2018-07-19 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D49508#1168620, @rjmccall wrote: > In https://reviews.llvm.org/D49508#1168599, @lebedev.ri wrote: > > > In https://reviews.llvm.org/D49508#1168584, @rjmccall wrote: > > > > > Hmm. I think the approach of flagging ICEs that are semantically

[PATCH] D49303: [CodeGen][ObjC] Treat non-escaping blocks as global blocks to make copy/dispose a no-op

2018-07-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: docs/Block-ABI-Apple.rst:64 enum { +BLOCK_IS_NOESCAPE = (1 << 23), BLOCK_HAS_COPY_DISPOSE = (1 << 25), Something happened to my older comments here, but please document the meaning of this

[PATCH] D49508: [Sema] Expr::skipRValueSubobjectAdjustments(): record skipped NoOp casts.

2018-07-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D49508#1168599, @lebedev.ri wrote: > In https://reviews.llvm.org/D49508#1168584, @rjmccall wrote: > > > Hmm. I think the approach of flagging ICEs that are semantically part of > > an explicit cast is probably a better representation for

r337483 - Fix failing testcase to actually be valid.

2018-07-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jul 19 12:05:13 2018 New Revision: 337483 URL: http://llvm.org/viewvc/llvm-project?rev=337483=rev Log: Fix failing testcase to actually be valid. Modified: cfe/trunk/test/SemaTemplate/pack-deduction.cpp Modified: cfe/trunk/test/SemaTemplate/pack-deduction.cpp URL:

r337481 - Fix template argument deduction when a parameter pack has a value

2018-07-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jul 19 12:00:37 2018 New Revision: 337481 URL: http://llvm.org/viewvc/llvm-project?rev=337481=rev Log: Fix template argument deduction when a parameter pack has a value provided by an outer template. We made the incorrect assumption in various places that the only way we

r337480 - fix typo in comment

2018-07-19 Thread Nico Weber via cfe-commits
Author: nico Date: Thu Jul 19 11:59:38 2018 New Revision: 337480 URL: http://llvm.org/viewvc/llvm-project?rev=337480=rev Log: fix typo in comment Modified: cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp Modified: cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp URL:

Re: r336467 - [OPENMP] Fix PR38026: Link -latomic when -fopenmp is used.

2018-07-19 Thread Hal Finkel via cfe-commits
On 07/19/2018 09:01 AM, Jonas Hahnfeld wrote: > On 2018-07-19 15:43, Hal Finkel wrote: >> On 07/16/2018 01:19 PM, Jonas Hahnfeld wrote: >>> [ Moving discussion from https://reviews.llvm.org/D49386 to the >>> relevant comment on cfe-commits, CC'ing Hal who commented on the >>> original issue ]

[PATCH] D49476: [Index] Set OrigD before D is changed.

2018-07-19 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a comment. `CXIndexDataConsumer.cpp` uses `ASTNode.OrigD`, that code is exercised when you run `c-index-test -index-file <...>`. I'd recommend to at least check if that command would produce a different output for the test case that you detected originally. Repository: rC

[PATCH] D49303: [CodeGen][ObjC] Treat non-escaping blocks as global blocks to make copy/dispose a no-op

2018-07-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 156332. ahatanak added a comment. Fix a bug where the capture cleanups weren't pushed when BlockDecl::doesNotEscape() returns true. Test that, when ARC is enabled, captures are retained and copied into the stack block object and destroyed when the stack

[PATCH] D49508: [Sema] Expr::skipRValueSubobjectAdjustments(): record skipped NoOp casts.

2018-07-19 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D49508#1168584, @rjmccall wrote: > Hmm. I think the approach of flagging ICEs that are semantically part of an > explicit cast is probably a better representation for tools across the board. I could do that, but i couldn't find where it

[PATCH] D49294: Sema: Fix explicit address space cast in C++

2018-07-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: lib/Sema/SemaOverload.cpp:3150 + !getLangOpts().OpenCLCPlusPlus) +return false; + rjmccall wrote: > yaxunl wrote: > > rjmccall wrote: > > > It's not really OpenCL C++

[PATCH] D49508: [Sema] Expr::skipRValueSubobjectAdjustments(): record skipped NoOp casts.

2018-07-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Hmm. I think the approach of flagging ICEs that are semantically part of an explicit cast is probably a better representation for tools across the board. If we *are* going to do it this way, though, I think you should (1) make the collection of skipped expressions

[PATCH] D49083: [HIP] Register/unregister device fat binary only once

2018-07-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:444 +auto HandleValue = +CtorBuilder.CreateAlignedLoad(GpuBinaryHandle, CGM.getPointerAlign()); +llvm::Constant *Zero = llvm::Constant::getNullValue(HandleValue->getType());

[PATCH] D49486: [cfe][CMake] Export the clang resource directory

2018-07-19 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. Thank you for doing this, I'm going to guess you have IWYU in mind :-) So as consumers of this, how do you envision we use the new variable? Something like https://stackoverflow.com/a/13429998 to copy the resource dir into our build root, and then an install rule to put

[PATCH] D49085: [Sema] Emit a diagnostic for an invalid dependent function template specialization

2018-07-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:4111 + "candidate template ignored: %select{template is not a function template" + "|is not a member of the enclosing namespace}0">; Your first explanation has a

[PATCH] D32696: More detailed docs for UsingShadowDecl

2018-07-19 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. Herald added a subscriber: llvm-commits. Ping! Repository: rL LLVM https://reviews.llvm.org/D32696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31696: Automatically add include-what-you-use for when building in tree

2018-07-19 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. Herald added a reviewer: javed.absar. This can be closed, IWYU no longer officially supports in-tree builds. https://reviews.llvm.org/D31696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Patch review please: D48862

2018-07-19 Thread Grang, Mandeep Singh via cfe-commits
Gentle reminder to the reviewers to please review my patch: https://reviews.llvm.org/D48862 [Fix lib paths for OpenEmbedded targets]. I wasn't sure who to add as reviewer for OpenEmbedded targets. So apologies if you are not the correct person to review this. Please feel free to add the correct

[PATCH] D49509: [libc++] Allow running ABI list tests with different ABI versions

2018-07-19 Thread Louis Dionne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337477: [libc++] Allow running ABI list tests with different ABI versions (authored by ldionne, committed by ). Changed prior to commit: https://reviews.llvm.org/D49509?vs=156148=156323#toc

[PATCH] D49509: [libc++] Allow running ABI list tests with different ABI versions

2018-07-19 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. Though it might be worth noting that we don't really have an "ABI v2" yet; we're just staging it ATM. Repository: rL LLVM https://reviews.llvm.org/D49509

r337474 - [analyzer] Fix memory sanitizer error in MallocChecker.

2018-07-19 Thread Reka Kovacs via cfe-commits
Author: rkovacs Date: Thu Jul 19 10:43:09 2018 New Revision: 337474 URL: http://llvm.org/viewvc/llvm-project?rev=337474=rev Log: [analyzer] Fix memory sanitizer error in MallocChecker. StringRef's data() returns a string that may be non-null-terminated. Switch to using StringRefs from const char

[PATCH] D49085: [Sema] Emit a diagnostic for an invalid dependent function template specialization

2018-07-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 156317. erik.pilkington added a comment. Improve the diagnostics. Thanks! https://reviews.llvm.org/D49085 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaTemplate.cpp

r337473 - Fix unused variable warning.

2018-07-19 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Thu Jul 19 10:19:16 2018 New Revision: 337473 URL: http://llvm.org/viewvc/llvm-project?rev=337473=rev Log: Fix unused variable warning. Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp URL:

[PATCH] D49232: [analyzer] Memoize complexity of SymExpr

2018-07-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337472: [analyzer] Memoize complexity of SymExpr (authored by mramalho, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D49232 Files:

r337472 - [analyzer] Memoize complexity of SymExpr

2018-07-19 Thread Mikhail R. Gadelha via cfe-commits
Author: mramalho Date: Thu Jul 19 10:03:12 2018 New Revision: 337472 URL: http://llvm.org/viewvc/llvm-project?rev=337472=rev Log: [analyzer] Memoize complexity of SymExpr Summary: This patch introduces a new member to SymExpr, which stores the symbol complexity, avoiding recalculating it every

[PATCH] D49536: [Analyzer] Quick Fix for exponential execution time when simpilifying complex additive expressions

2018-07-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. I was thinking of two flags, but that'll work too. https://reviews.llvm.org/D49536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D49112: [Sema] Implement -Wmemset-transposed-args

2018-07-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337470: [Sema] Add a new warning, -Wmemset-transposed-args (authored by epilk, committed by ). Changed prior to commit: https://reviews.llvm.org/D49112?vs=156178=156298#toc Repository: rC Clang

r337470 - [Sema] Add a new warning, -Wmemset-transposed-args

2018-07-19 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Thu Jul 19 09:46:15 2018 New Revision: 337470 URL: http://llvm.org/viewvc/llvm-project?rev=337470=rev Log: [Sema] Add a new warning, -Wmemset-transposed-args This diagnoses calls to memset that have the second and third arguments transposed, for example: memset(buf,

[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

2018-07-19 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 156295. dankm retitled this revision from "Initial implementation of -fmacro-prefix-mapand -ffile-prefix-map" to "Initial implementation of -fmacro-prefix-map and -ffile-prefix-map". dankm edited the summary of this revision. Repository: rC Clang

  1   2   >