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

2018-07-19 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 156237. lebedev.ri added a comment. Breakthrough: no more false-positives due to the `MaterializeTemporaryExpr` skipping over NoOp casts. (https://reviews.llvm.org/D49508) Slight docs update. Ping, please review! We are so close :) Repository: rC Clan

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

2018-07-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:23 + +const char DefaultIgnoredValues[] = "0;1;2;10;100;"; + 0x8000- wrote: > aaron.ballman wrote: > > lebedev.ri wrote: > > > aaron.ballman wrote: > > > > Why 2, 10

[PATCH] D49540: [clangd] FuzzyMatch exposes an API for its word segmentation. NFC

2018-07-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: ioeric, omtcyfz. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. This is intended to be used for indexing, e.g. in https://reviews.llvm.org/D49417 Repository: rCTE Clang Tools Extra https://reviews

[PATCH] D48786: [Preprocessor] Stop entering included files after hitting a fatal error.

2018-07-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM as well https://reviews.llvm.org/D48786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r337447 - [PCH+Modules] Load -fmodule-map-file content before including PCHs

2018-07-19 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Thu Jul 19 05:32:06 2018 New Revision: 337447 URL: http://llvm.org/viewvc/llvm-project?rev=337447&view=rev Log: [PCH+Modules] Load -fmodule-map-file content before including PCHs Consider: 1) Generate PCH with -fmodules and -fmodule-map-file 2) Use PCH with -fmodules and the s

[PATCH] D48685: [PCH+Modules] Load -fmodule-map-file content before including PCHs

2018-07-19 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337447: [PCH+Modules] Load -fmodule-map-file content before including PCHs (authored by bruno, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/

[PATCH] D49540: [clangd] FuzzyMatch exposes an API for its word segmentation. NFC

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

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

2018-07-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM aside from a minor nit. Comment at: clang/lib/Sema/SemaChecking.cpp:8751 + + if (auto *BO = dyn_cast(SizeofExpr)) { +if (BO->getOpcode() != BO_Mul && BO->getOpcode() != BO_Add) `cons

[PATCH] D49421: [CodeComplete] Fix accessibilty of protected members from base class.

2018-07-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D49421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

r337449 - [PowerPC] Handle __builtin_xxpermdi the same way as GCC does

2018-07-19 Thread Nemanja Ivanovic via cfe-commits
Author: nemanjai Date: Thu Jul 19 05:44:15 2018 New Revision: 337449 URL: http://llvm.org/viewvc/llvm-project?rev=337449&view=rev Log: [PowerPC] Handle __builtin_xxpermdi the same way as GCC does The codegen for this builtin was initially implemented to match GCC. However, due to interest from us

[PATCH] D48786: [Preprocessor] Stop entering included files after hitting a fatal error.

2018-07-19 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. Thanks for working on this. LGTM with improvements in the comments as mentioned by @jkorous https://reviews.llvm.org/D48786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

[PATCH] D49424: [PowerPC] Handle __builtin_xxpermdi the same way as GCC does

2018-07-19 Thread Nemanja Ivanovic via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337449: [PowerPC] Handle __builtin_xxpermdi the same way as GCC does (authored by nemanjai, committed by ). Changed prior to commit: https://reviews.llvm.org/D49424?vs=155869&id=156251#toc Repository:

r337451 - NFC: Remove extraneous semicolons as pointed out in the differential review

2018-07-19 Thread Nemanja Ivanovic via cfe-commits
Author: nemanjai Date: Thu Jul 19 05:49:27 2018 New Revision: 337451 URL: http://llvm.org/viewvc/llvm-project?rev=337451&view=rev Log: NFC: Remove extraneous semicolons as pointed out in the differential review The commit for https://reviews.llvm.org/D49424 missed the comment about the extraneous

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Lex/LiteralSupport.cpp:815 .Cases("il", "i", "if", true) + .Cases("d", "y", LangOpts.CPlusPlus2a) .Default(false); Is it possible for the library to expose those outside of C++2a mode? We pas

[PATCH] D45444: [clang-tidy] implement new check for const-correctness

2018-07-19 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Yes, but that is complicated. Functionality for that will first be implemented in the libTooling and then utilized here later. Am 19.07.2018 um 04:16 schrieb Florin Iucha via Phabricator: > 0x8000- added a comment. > > Any plans for fix-its that will add the sugge

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Lex/LiteralSupport.cpp:815 .Cases("il", "i", "if", true) + .Cases("d", "y", LangOpts.CPlusPlus2a) .Default(false); aaron.ballman wrote: > Is it possible for the library to expose those outside o

[PATCH] D49510: [OpenMP][Clang] Usability improvements for OpenMP offloading

2018-07-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. 1. The new tool definitely requires an RFC at first. 2. The patch is too big and should be split into several small patches Repository: rC Clang https://reviews.llvm.org/D49510 ___ cfe-commits mailing list cfe-commits@lis

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

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: include/clang/Basic/DiagnosticDriverKinds.td:118 "invalid deployment target for -stdlib=libc++ (requires %0 or later)">; +def err_drv_invalid_argument_to_fmacro_prefix_map : Error< + "invalid argument '%0' to -fmacro-prefix-map">;

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 156252. erichkeane marked 4 inline comments as done. erichkeane added a comment. @aaron.ballman s comments. https://reviews.llvm.org/D49504 Files: lib/Lex/LiteralSupport.cpp test/SemaCXX/cxx2a-user-defined-literals.cpp Index: lib/Lex/LiteralSupport

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: test/SemaCXX/cxx2a-user-defined-literals.cpp:23 +// expected-error@+3{{no viable conversion from 'int' to 'chrono::day'}} +// expected-note@9{{candidate constructor (the implicit copy constructor)}} +// expected-note@9{{candidate cons

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: test/SemaCXX/cxx2a-user-defined-literals.cpp:23 +// expected-error@+3{{no viable conversion from 'int' to 'chrono::day'}} +// expected-note@9{{candidate constructor (the implicit copy constructor)}} +// expected-note@9{{candidate cons

[PATCH] D49543: [clangd] Penalize non-instance members when accessed via class instances.

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. The following are metrics for explicit member access completions. There is no noticeable impact on other completion types. Before: EXPLICIT_MEMBER_A

r337453 - [CodeComplete] Fix accessibilty of protected members from base class.

2018-07-19 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Jul 19 06:32:00 2018 New Revision: 337453 URL: http://llvm.org/viewvc/llvm-project?rev=337453&view=rev Log: [CodeComplete] Fix accessibilty of protected members from base class. Summary: Currently, protected members from base classes are marked as inaccessible when comple

[PATCH] D49421: [CodeComplete] Fix accessibilty of protected members from base class.

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337453: [CodeComplete] Fix accessibilty of protected members from base class. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/

[PATCH] D49421: [CodeComplete] Fix accessibilty of protected members from base class.

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337453: [CodeComplete] Fix accessibilty of protected members from base class. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D49421?vs=156146&id=156257#toc Repos

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: lib/Lex/LiteralSupport.cpp:815 .Cases("il", "i", "if", true) + .Cases("d", "y", LangOpts.CPlusPlus2a) .Default(false);

r337454 - Enable C++2a Chrono Literals

2018-07-19 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Thu Jul 19 06:36:57 2018 New Revision: 337454 URL: http://llvm.org/viewvc/llvm-project?rev=337454&view=rev Log: Enable C++2a Chrono Literals C++2a via http://wg21.link/p0355 permits the library literals of 'd' and 'y'. This patch enables them in the Lexer so that they can

[PATCH] D46190: For a used declaration, mark any associated usings as referenced.

2018-07-19 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. @probinson: I tried `clang-format-diff` and the main format issues are with the test cases. Do you want the test cases to follow the clang format? https://reviews.llvm.org/D46190 ___ cfe-commits mailing list cf

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337454: Enable C++2a Chrono Literals (authored by erichkeane, committed by ). Repository: rC Clang https://reviews.llvm.org/D49504 Files: lib/Lex/LiteralSupport.cpp test/SemaCXX/cxx2a-user-defined

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

2018-07-19 Thread Hal Finkel via cfe-commits
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 ] > > Is this change really a good idea? It always requires libatomic for > all OpenMP applications, e

[PATCH] D49518: [VFS] Emit an error when a file isn't located in any directory.

2018-07-19 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Volodymyr, thanks for improving this. > Need to double check what tests we have when using relative path names at the > root level. Another interesting place to look at is `unittests/Basic/VirtualFileSystemTest.cpp` > I'd like to make the behavior consistent because

[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)) --

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

2018-07-19 Thread Churbanov, Andrey via cfe-commits
> Can you please elaborate on why you feel that this is problematic? This change completely disables OpenMP parallelization on all systems those do not have libatomic library accessible. So many people who earlier had working codes now cannot compiler any OpenMP program, even just print "Hello"

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

2018-07-19 Thread Alex Bradbury via Phabricator via cfe-commits
asb accepted this revision. asb added a comment. Herald added a subscriber: rkruppe. This looks good to me with two caveats - the tests don't seem to check that the "machine" is the default mode when the "interrupt" attribute has no arguments. - Although the conversion from RISCVInterruptAttr::u

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

2018-07-19 Thread Jonas Hahnfeld via cfe-commits
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 ] Is this change really a good idea? It always requires libatomic

r337456 - [CodeGen] Disable aggressive structor optimizations at -O0, take 3

2018-07-19 Thread Pavel Labath via cfe-commits
Author: labath Date: Thu Jul 19 07:05:22 2018 New Revision: 337456 URL: http://llvm.org/viewvc/llvm-project?rev=337456&view=rev Log: [CodeGen] Disable aggressive structor optimizations at -O0, take 3 The previous version of this patch (r332839) was reverted because it was causing "definition with

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

2018-07-19 Thread Louis Dionne via Phabricator via cfe-commits
ldionne edited subscribers, added: cfe-commits; removed: llvm-commits. ldionne added a comment. In https://reviews.llvm.org/D49509#1167500, @smeenai wrote: > This went out to llvm-commits. You may wanna re-upload with cfe-commits added > instead. Ah! That uncovers a deeper problem -- the instr

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

2018-07-19 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In https://reviews.llvm.org/D49509#1168084, @ldionne wrote: > In https://reviews.llvm.org/D49509#1167500, @smeenai wrote: > > > This went out to llvm-commits. You may wanna re-upload with cfe-commits > > added instead. > > > Ah! That uncovers a deeper problem -- the inst

[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:444 +auto HandleValue = +CtorBuilder.CreateAlignedLoad(GpuBinaryHandle, CGM.getPointerAlign()); +llvm::Constant *Zero = llvm::Constant::getNullValue(Handle

[PATCH] D48341: [clang-doc] Refactoring mapper to map by scope

2018-07-19 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Herald added a subscriber: arphaman. Comment at: clang-tools-extra/test/clang-doc/yaml-record.cpp:44 +// CHECK-0: --- +// CHECK-0-NEXT: USR: '06B5F6A19BA9F6A832E127C9968282B94619B210' +// CHECK-0-NEXT: Name:'C' -

[PATCH] D49546: [clangd] Implement query iterators for Dex symbol index

2018-07-19 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: arphaman, jkorous, MaskRay, ilya-biryukov, mgorny. This is a proof-of-concept implementation of query iterators. At the moment, it is pretty messy an

[PATCH] D46190: For a used declaration, mark any associated usings as referenced.

2018-07-19 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. @rsmith any further thoughts? We would really like to get this in before the LLVM 7.0 branch, currently scheduled for 1 August. In https://reviews.llvm.org/D46190#1168027, @CarlosAlbertoEnciso wrote: > @probinson: I tried `clang-format-diff` and the main format issue

[PATCH] D48341: [clang-doc] Refactoring mapper to map by scope

2018-07-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/test/clang-doc/yaml-record.cpp:44 +// CHECK-0: --- +// CHECK-0-NEXT: USR: '06B5F6A19BA9F6A832E127C9968282B94619B210' +// CHECK-0-NEXT: Name:'C' juliehockett wrote: > ioeric wrote:

[PATCH] D48560: [clangd] JSON <-> XPC conversions

2018-07-19 Thread Jan Korous via Phabricator via cfe-commits
jkorous marked 12 inline comments as done. jkorous added inline comments. Comment at: xpc/XPCJSONConversions.cpp:62 + if (objType == XPC_TYPE_UINT64) +return json::Expr(xpc_uint64_get_value(xpcObj)); + if (objType == XPC_TYPE_STRING) sammccall wrote: > hmm,

[PATCH] D49546: [clangd] Implement query iterators for Dex symbol index

2018-07-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for sending this early! Rough interface comments - mostly looks good though! Comment at: clang-tools-extra/clangd/index/dex/QueryIterator.h:26 + +using PostingList = std::vector; + we should at least use a type alias for a DocI

[PATCH] D48562: [clangd] XPC transport layer

2018-07-19 Thread Jan Korous via Phabricator via cfe-commits
jkorous marked 7 inline comments as done. jkorous added inline comments. Comment at: xpc/test-client/ClangdXPCTestClient.cpp:51 + dlHandle, "clangd_xpc_get_bundle_identifier"); + xpc_connection_t conn = + xpc_connection_create(clangd_xpc_get_bundle_identifier(), NU

r337463 - [analyzer] Add support for more basic_string API in

2018-07-19 Thread Reka Kovacs via cfe-commits
Author: rkovacs Date: Thu Jul 19 08:10:06 2018 New Revision: 337463 URL: http://llvm.org/viewvc/llvm-project?rev=337463&view=rev Log: [analyzer] Add support for more basic_string API in DanglingInternalBufferChecker. A pointer referring to the elements of a basic_string may be invalidated by call

[PATCH] D49360: [analyzer] Add support for more basic_string API in DanglingInternalBufferChecker

2018-07-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337463: [analyzer] Add support for more basic_string API in (authored by rkovacs, committed by ). Repository: rC Clang https://reviews.llvm.org/D49360 Files: lib/StaticAnalyzer/Checkers/DanglingInte

[PATCH] D49548: [clangd] XPC WIP

2018-07-19 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added reviewers: sammccall, arphaman. Herald added subscribers: cfe-commits, dexonsmith, MaskRay, ioeric, ilya-biryukov, mgorny. Combined, rebased and modified original XPC patches. - https://reviews.llvm.org/D48559 [clangd] refactoring for XPC transport la

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

2018-07-19 Thread Dan McGregor via Phabricator via cfe-commits
dankm added inline comments. Comment at: include/clang/Lex/PreprocessorOptions.h:171 + /// A prefix map for __FILE__ and __BASEFILE__ + std::map MacroPrefixMap; + erichkeane wrote: > erichkeane wrote: > > It seems this can be StringRefs as well. > Did you miss

[PATCH] D48559: [clangd] refactoring for XPC transport layer [NFCI]

2018-07-19 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. Sam, just out of curiosity - would it be possible for you to share any relevant experience gained by using porting clangd to protobuf-based transport layer? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48559

r337466 - [analyzer] Fix disappearing notes in DanglingInternalBufferChecker tests

2018-07-19 Thread Reka Kovacs via cfe-commits
Author: rkovacs Date: Thu Jul 19 08:44:46 2018 New Revision: 337466 URL: http://llvm.org/viewvc/llvm-project?rev=337466&view=rev Log: [analyzer] Fix disappearing notes in DanglingInternalBufferChecker tests Correct a mistake of the exact same kind I am writing this checker for. Modified: cfe

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 156280. leonardchan marked an inline comment as done. Repository: rC Clang https://reviews.llvm.org/D48661 Files: include/clang/AST/ASTContext.h include/clang/Basic/FixedPoint.h include/clang/Basic/TargetInfo.h lib/AST/ASTContext.cpp lib/Basi

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

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: include/clang/Lex/PreprocessorOptions.h:171 + /// A prefix map for __FILE__ and __BASEFILE__ + std::map MacroPrefixMap; + dankm wrote: > erichkeane wrote: > > erichkeane wrote: > > > It seems this can be StringRefs

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

2018-07-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. You can probably get rid of the llvm-objcopy code and make this a lot simpler with something like: 1. Call `getSection()` on the Binary object to get the text section. 2. Read the `sh_offset` and `sh_size` of that section. 3. Copy `sh_size` bytes from the start of the

[PATCH] D49549: Change 'clang-test' to 'check-clang' on the hacking webpage

2018-07-19 Thread Arnaud Coomans via Phabricator via cfe-commits
acoomans created this revision. acoomans added reviewers: chandlerc, cfe-commits. The command to run tests was previously changed from 'clang-test' to 'check-clang'; with 'clang-test' remaining available as a legacy alias (see git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159483 91177

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

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, mgorny. Also, the `AF_InternalBuffer` allocation family is renamed to `AF_InnerBuffer`. I'm

[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 https://re

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&view=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, si

[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&id=156298#toc Repository: rC Clang h

[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 http://lists

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&view=rev Log: [analyzer] Memoize complexity of SymExpr Summary: This patch introduces a new member to SymExpr, which stores the symbol complexity, avoiding recalculating it ev

[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: include/cl

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&view=rev Log: Fix unused variable warning. Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp URL: http://llvm.org/

[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 clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp

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&view=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

[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 _

[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&id=156323#toc Reposito

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] 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 http://lists.llvm.org/cgi-bin

[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] 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 subj

[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 i

[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()); yax

[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 opt

[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++ that

[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] 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 bl

[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 Clan

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 ] >>>

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&view=rev Log: fix typo in comment Modified: cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp Modified: cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp URL: http://llvm.org/viewvc/llvm-pro

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&view=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 wa

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&view=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 UR

[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 too

[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 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] 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] 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 clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp

[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 lib/Code

[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 a

[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 fir

[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 divis

[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] 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 sto

[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 warn

[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 /usr

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&view=rev Log: [Sema] Diagnose an invalid dependent function template specialization Previously, clang marked the specialization as invalid without emitting a diagnostic. This lead

[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: https://reviews.llvm.o

[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 tools/libclang/Index

[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 th

  1   2   >