[PATCH] D63623: [clang-tidy] Add a check on expected return values of posix functions (except posix_openpt) in Android module.

2019-06-25 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked an inline comment as done. jcai19 added inline comments. Comment at: clang-tools-extra/clang-tidy/android/PosixReturnCheck.cpp:39 + const auto &BinOp = *Result.Nodes.getNodeAs("binop"); + diag(BinOp.getOperatorLoc(), "posix functions (except posix_openpt) never r

[PATCH] D63623: [clang-tidy] Add a check on expected return values of posix functions (except posix_openpt) in Android module.

2019-06-25 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 206588. jcai19 marked 4 inline comments as done. jcai19 added a comment. Update a test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63623/new/ https://reviews.llvm.org/D63623 Files: clang-tools-extra/c

[PATCH] D60943: Delay diagnosing asm constraints that require immediates until after inlining

2019-06-25 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 206587. void added a comment. Modify so that no diagnistics are emitted until we can determine if it's an immediate or not. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60943/new/ https://reviews.llvm.org/D60943 Files: lib/C

[PATCH] D60943: Delay diagnosing asm constraints that require immediates until after inlining

2019-06-25 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. This should be ready for review now. PTAL. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60943/new/ https://reviews.llvm.org/D60943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[PATCH] D63623: [clang-tidy] Add a check on expected return values of posix functions (except posix_openpt) in Android module.

2019-06-25 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 206586. jcai19 marked an inline comment as done. jcai19 added a comment. Move the check from android to bugprone. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63623/new/ https://reviews.llvm.org/D63623 Files:

[PATCH] D63718: [ADT] Implement llvm::bsearch() with std::partition_point()

2019-06-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @sammccall Ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63718/new/ https://reviews.llvm.org/D63718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D62738: [HIP] Support attribute hip_pinned_shadow

2019-06-25 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364381: [HIP] Support attribute hip_pinned_shadow (authored by yaxunl, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llv

r364381 - [HIP] Support attribute hip_pinned_shadow

2019-06-25 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Jun 25 20:47:37 2019 New Revision: 364381 URL: http://llvm.org/viewvc/llvm-project?rev=364381&view=rev Log: [HIP] Support attribute hip_pinned_shadow This patch introduces support of hip_pinned_shadow variable for HIP. A hip_pinned_shadow variable is a global variable wi

r364380 - Fix build failure due to missing break

2019-06-25 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Jun 25 20:33:03 2019 New Revision: 364380 URL: http://llvm.org/viewvc/llvm-project?rev=364380&view=rev Log: Fix build failure due to missing break Modified: cfe/trunk/lib/Basic/Targets/ARM.cpp Modified: cfe/trunk/lib/Basic/Targets/ARM.cpp URL: http://llvm.org/viewvc

[PATCH] D63789: [ODRHash] Fix null pointer dereference for ObjC selectors with empty slots.

2019-06-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/AST/ODRHash.cpp:73 AddBoolean(S.isUnarySelector()); unsigned NumArgs = S.getNumArgs(); for (unsigned i = 0; i < NumArgs; ++i) { rtrieu wrote: > There's actually a second bug here as well. When p

[PATCH] D63789: [ODRHash] Fix null pointer dereference for ObjC selectors with empty slots.

2019-06-25 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu added inline comments. Comment at: clang/lib/AST/ODRHash.cpp:73 AddBoolean(S.isUnarySelector()); unsigned NumArgs = S.getNumArgs(); for (unsigned i = 0; i < NumArgs; ++i) { There's actually a second bug here as well. When processing an arbi

[PATCH] D51262: Implement P0553 and P0556

2019-06-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 206571. mclow.lists marked 4 inline comments as done. mclow.lists added a comment. Address a couple of review comments. Added a few more `uint128_t` rotation tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51262/new/ https://reviews.llvm.org

[PATCH] D62970: [clang-doc] De-duplicate comments and locations

2019-06-25 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 206570. DiegoAstiazaran added a comment. Add comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62970/new/ https://reviews.llvm.org/D62970 Files: clang-tools-extra/clang-doc/Representation.cpp clang-tools-extra/clang-doc/Representa

[PATCH] D63681: [clang-scan-deps] Introduce the DependencyScanning library with the thread worker code and better error handling

2019-06-25 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. LGTM! Some quick stats on our end (running Windows 10 on a Intel W-2135, 6-core, 3.7 GHz, NVMe SSD): on a large .SLN compiling approx. 16,000 .CPP files through 600 unity .CPPs and 23,000 .H files, out of **86 secs** spent in `ClangScanDeps`, about **32 secs** are spent

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-06-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Patch generally looks good; just a minor concern about the output format. Comment at: clang/lib/Frontend/Rewrite/InclusionRewriter.cpp:487-490 +OS << " - evaluated by -frewrite-includes */" << MainEOL; +OS << (elif ? "#elif" : "#i

[PATCH] D63663: [clang-doc] Add html links to references

2019-06-25 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran added inline comments. Comment at: clang-tools-extra/unittests/clang-doc/SerializeTest.cpp:145-146 void ProtectedMethod(); -};)raw", 3, /*Public=*/false, Infos); +};)raw", + 3, /*Public=*/false, Infos); juliehockett wrot

[PATCH] D63663: [clang-doc] Add html links to references

2019-06-25 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 206561. DiegoAstiazaran marked 10 inline comments as done. DiegoAstiazaran retitled this revision from "[clang-doc] Add html links to the parents of a RecordInfo" to "[clang-doc] Add html links to references". DiegoAstiazaran edited the summary of this

r364365 - [analyzer] exploded-graph-rewriter: Prettier location context dumps.

2019-06-25 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jun 25 17:14:49 2019 New Revision: 364365 URL: http://llvm.org/viewvc/llvm-project?rev=364365&view=rev Log: [analyzer] exploded-graph-rewriter: Prettier location context dumps. Make them span wider. Modified: cfe/trunk/test/Analysis/exploded-graph-rewriter/environ

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I've addressed Lang's comments and the re-audited all the new FIXME instances. This patch now actually drops errors on the floor instead of implicitly erroring out unless the error path is tested (which is what I had before). This hides bugs, but I left FIXMEs everywhere an

[PATCH] D63167: [Clang] Remove unused -split-dwarf and obsolete -enable-split-dwarf

2019-06-25 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:864 default: -if (!CodeGenOpts.SplitDwarfOutput.empty() && -(CodeGenOpts.getSplitDwarfMode() == CodeGenOptions::SplitFileFission)) { +if (!CodeGenOpts.SplitDwarfOutput.empty()) {

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread JF Bastien via Phabricator via cfe-commits
jfb added inline comments. Comment at: clang-tools-extra/clang-doc/BitcodeReader.cpp:611-618 +Expected MaybeCode = Stream.ReadCode(); +if (!MaybeCode) { + // FIXME this drops the error on the floor. + consumeError(MaybeCode.takeError()); +} + +// FIX

r364362 - print-supported-cpus quality of life patch.

2019-06-25 Thread Ziang Wan via cfe-commits
Author: ziangwan725 Date: Tue Jun 25 16:57:14 2019 New Revision: 364362 URL: http://llvm.org/viewvc/llvm-project?rev=364362&view=rev Log: print-supported-cpus quality of life patch. Claim all input files so that clang does not give a warning. Add two short-cut aliases: -mcpu=? and -mtune=?. Modi

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread Francis Visoiu Mistrih via Phabricator via cfe-commits
thegameg added inline comments. Comment at: llvm/include/llvm/Bitcode/BitstreamReader.h:489 bool ReadBlockEnd() { if (BlockScope.empty()) return true; jfb wrote: > thegameg wrote: > > Any reason why this doesn't return `Error`? > I'm not sure it's reall

[PATCH] D62611: [analyzer][Dominators] Add unittests

2019-06-25 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: clang/unittests/Analysis/CFGDominatorTree.cpp:22-32 +template struct FindStmt { + bool operator()(const CFGElement &E) { +if (auto S = E.getAs()) + return isa(S->getStmt()); +r

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D63518#1558197 , @lhames wrote: > I haven't had a chance to audit the whole patch yet, but in general the error > suppression idioms are unsafe (though maybe no more so than the existing > code?). > > I would be inclined to audit

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread JF Bastien via Phabricator via cfe-commits
jfb marked 8 inline comments as done. jfb added inline comments. Comment at: clang-tools-extra/clang-doc/BitcodeReader.cpp:527-529 + if (llvm::Error Err = readSubBlock(BlockOrCode, I)) { +if (llvm::Error Skipped = Stream.SkipBlock()) + return Skipped; --

Re: r364359 - Revert Devirtualize destructor of final class.

2019-06-25 Thread Rumeet Dhindsa via cfe-commits
Sorry for not including the reason, I discussed offline with the author to temporarily revert this patch. On Tue, Jun 25, 2019 at 4:00 PM Roman Lebedev wrote: > On Wed, Jun 26, 2019 at 1:58 AM Rumeet Dhindsa via cfe-commits > wrote: > > > > Author: rdhindsa > > Date: Tue Jun 25 15:58:25 2019 >

Re: r364359 - Revert Devirtualize destructor of final class.

2019-06-25 Thread Roman Lebedev via cfe-commits
On Wed, Jun 26, 2019 at 1:58 AM Rumeet Dhindsa via cfe-commits wrote: > > Author: rdhindsa > Date: Tue Jun 25 15:58:25 2019 > New Revision: 364359 > > URL: http://llvm.org/viewvc/llvm-project?rev=364359&view=rev > Log: > Revert Devirtualize destructor of final class. > > This reverts r364100 (git

r364359 - Revert Devirtualize destructor of final class.

2019-06-25 Thread Rumeet Dhindsa via cfe-commits
Author: rdhindsa Date: Tue Jun 25 15:58:25 2019 New Revision: 364359 URL: http://llvm.org/viewvc/llvm-project?rev=364359&view=rev Log: Revert Devirtualize destructor of final class. This reverts r364100 (git commit 405c2b16225fc6eaf5eb8ba3ce584699a3b159ef) Removed: cfe/trunk/test/CodeGenCXX/

[PATCH] D63786: Print NULL as "(null)" in diagnostic message

2019-06-25 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM. I have some minor style comments that could be fixed as part of the commit. Comment at: clang/tools/c-index-test/c-index-test.c:4648

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread Lang Hames via Phabricator via cfe-commits
lhames added a comment. I haven't had a chance to audit the whole patch yet, but in general the error suppression idioms are unsafe (though maybe no more so than the existing code?). I would be inclined to audit all those FIXMEs and replace them with cantFails or consumeErrors. consumeError wil

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, arg_base, arg_begin, lild

[PATCH] D63793: Treat the range of representable values of floating-point types as [-inf, +inf] not as [-max, +max].

2019-06-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added reviewers: rnk, BillyONeal. Herald added a project: clang. Prior to r329065, we used [-max, max] as the range of representable values because LLVM's `fptrunc` did not guarantee defined behavior when truncating from a larger floating-point type to a smalle

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r364352 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63774/new/ https://reviews.llvm.org/D63774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

r364352 - android: enable double-word CAS on x64

2019-06-25 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Tue Jun 25 14:43:34 2019 New Revision: 364352 URL: http://llvm.org/viewvc/llvm-project?rev=364352&view=rev Log: android: enable double-word CAS on x64 The android target assumes that for the x86_64 target, the CPU supports SSE4.2 and popcnt. This implies that the CPU is Neh

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Yeah LAHF/SAHF just improves codegen. Lack of it won't result in any library calls. This patch LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63774/new/ https://reviews.llvm.org/D63774 ___

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese added inline comments. Comment at: clang-tools-extra/clang-doc/BitcodeReader.cpp:527-529 + if (llvm::Error Err = readSubBlock(BlockOrCode, I)) { +if (llvm::Error Skipped = Stream.SkipBlock()) + return Skipped; This is a pretty big

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread Francis Visoiu Mistrih via Phabricator via cfe-commits
thegameg added inline comments. Comment at: llvm/include/llvm/Bitcode/BitstreamReader.h:441 // If we found a sub-block, just skip over it and check the next entry. - if (SkipBlock()) -return BitstreamEntry::getError(); + if (llvm::Error Err = SkipBlock())

Re: r364331 - [ARM] Support inline assembler constraints for MVE.

2019-06-25 Thread Richard Smith via cfe-commits
On Tue, 25 Jun 2019 at 09:49, Simon Tatham via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: statham > Date: Tue Jun 25 09:49:32 2019 > New Revision: 364331 > > URL: http://llvm.org/viewvc/llvm-project?rev=364331&view=rev > Log: > [ARM] Support inline assembler constraints for MVE. >

[PATCH] D63760: [clangd] Address limitations in SelectionTree:

2019-06-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 206531. sammccall marked 2 inline comments as done. sammccall added a comment. Revert multi-range support. Add early hit detection (before children) instead. Add more tests. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 206527. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/ASTContext.cpp lib/CodeGen/CGDecl.cpp lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CGOpenMPRuntime.

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @craig.topper, hmm, what happens in terms of CG when LAHF/SAHF are not available? I assume its just worse CG as you could spill AH onto the stack and do a load/store. This actually results in library calls which may not be possible to fulfill. Repository: rC Clan

r364347 - Remove redundant expression evaluation context when substituting into a

2019-06-25 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jun 25 13:40:27 2019 New Revision: 364347 URL: http://llvm.org/viewvc/llvm-project?rev=364347&view=rev Log: Remove redundant expression evaluation context when substituting into a template argument. We do need one of these but we don't need two. Modified: cfe/trunk/l

[PATCH] D63789: [ODRHash] Fix null pointer dereference for ObjC selectors with empty slots.

2019-06-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added a reviewer: rtrieu. Herald added subscribers: dexonsmith, jkorous. Because `Selector::getIdentifierInfoForSlot` returns NULL if a slot has no corresponding identifier, use `Selector::getNameForSlot` instead. rdar://problem/51615164 https://reviews.ll

[PATCH] D62738: [HIP] Support attribute hip_pinned_shadow

2019-06-25 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. Thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62738/new/ https://reviews.llvm.org/D62738 ___ cfe-commits mailing list cfe-com

[PATCH] D63786: Print NULL as "(null)" in diagnostic message

2019-06-25 Thread Andus Yu via Phabricator via cfe-commits
andusy created this revision. andusy added reviewers: hubert.reinterpretcast, xingxue, jasonliu, daltenty, cebowleratibm. andusy added a project: clang. Herald added subscribers: jsji, arphaman. Passing a null pointer to the `printf` family for a %s format specifier leads to undefined behaviour.

[PATCH] D62611: [analyzer][Dominators] Add unittests

2019-06-25 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/unittests/Analysis/CFGBuilder.h:16 + +class BuildResult { +public: Given that now it's in a header, i guess we need to pick a less generic name. Eg., `CFGBuildResult`. Comment at: clang/unittests/An

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked 2 inline comments as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:744 OMPRTL__tgt_target_data_update_nowait, + // Call to int64_t __tgt_mapper_num_components(void *rt_mapper_handle); + OMPRTL__tgt_mapper_num_components, --

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63518/new/ https://reviews.llvm.org/D63518 ___ c

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 206519. compnerd added a comment. Move test case around Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63774/new/ https://reviews.llvm.org/D63774 Files: lib/Driver/ToolChains/Arch/X86.cpp test/Driver/clang-translation.c

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Another odd feature that's missing from early x86-64 CPUs is sahf. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63774/new/ https://reviews.llvm.org/D63774 ___ cfe-commits mailing list c

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked 4 inline comments as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, ar

[PATCH] D63288: [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator.

2019-06-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 206510. ymandel added a comment. Rebase onto fix to `runCheckOnCode`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63288/new/ https://reviews.llvm.org/D63288 Files: clang-tools-extra/clang-tidy/utils/Transf

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, arg_base, arg_begin, lild

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 206508. compnerd added a comment. add additional context and test case Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63774/new/ https://reviews.llvm.org/D63774 Files: lib/Driver/ToolChains/Arch/X86.cpp test/Driver/andro

[PATCH] D63784: [clang-tidy] Fix ClangTidyTest to initialize context before checks.

2019-06-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a subscriber: xazax.hun. Herald added a project: clang. Currently, `clang::tidy::test::runCheckOnCode()` constructs the check instances *before* initializing the ClangTidyContext. This ordering causes problems when th

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: test/Driver/android-default-x86_64.c:1 +// RUN: %clang -### -target x86_64-unknown-linux-android -c %s 2>&1 | FileCheck %s +// CHECK: "-mcx16" should we just update the android 64 case in clang-translation.c instea

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @lebedev.ri - sure, I will add a driver test to ensure that the feature is set on the command line when invoked from the driver, however, I don't think that there is really much in terms of testing that you can do for this type of stuff other than throw a large corpus

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, ar

[PATCH] D63180: [clang-doc] Adds HTML generator

2019-06-25 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran marked 12 inline comments as done. DiegoAstiazaran added a comment. A couple of comments that were related to the function writeDescription() were marked as done since most of that function was deleted. Rendering of the other kinds of CommentInfos will be handled later. ==

[PATCH] D63180: [clang-doc] Adds HTML generator

2019-06-25 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 206502. DiegoAstiazaran marked 4 inline comments as done. DiegoAstiazaran edited the summary of this revision. DiegoAstiazaran added a comment. Removed rendering of some CommentInfo kinds to reduce review load. Removed all , , and tags; they are not n

[PATCH] D62738: [HIP] Support attribute hip_pinned_shadow

2019-06-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 206504. yaxunl retitled this revision from "[HIP] Support device_shadow variable" to "[HIP] Support attribute hip_pinned_shadow". yaxunl edited the summary of this revision. yaxunl added a comment. rename the attribute and make it HIP only. CHANGES SINCE LAS

[PATCH] D63288: [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator.

2019-06-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added inline comments. Comment at: clang-tools-extra/unittests/clang-tidy/TransformerClangTidyCheckTest.cpp:92 + const std::string Input = "void log(int);"; + EXPECT_EQ(Input, test::runCheckOnCode(Input)); +} y

r364340 - Add regression test for PR41576 (which is already fixed in trunk,

2019-06-25 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jun 25 11:42:53 2019 New Revision: 364340 URL: http://llvm.org/viewvc/llvm-project?rev=364340&view=rev Log: Add regression test for PR41576 (which is already fixed in trunk, perhaps by r361300). Modified: cfe/trunk/test/SemaTemplate/lambda-capture-pack.cpp Modified:

[PATCH] D63288: [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator.

2019-06-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang-tools-extra/unittests/clang-tidy/TransformerClangTidyCheckTest.cpp:92 + const std::string Input = "void log(int);"; + EXPECT_EQ(Input, test::runCheckOnCode(Input)); +} y

[PATCH] D63288: [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator.

2019-06-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang-tools-extra/unittests/clang-tidy/TransformerClangTidyCheckTest.cpp:92 + const std::string Input = "void log(int);"; + EXPECT_EQ(Input, test::runCheckOnCode(Input)); +} g

[PATCH] D62293: [modules] Add PP callbacks for entering and leaving a submodule.

2019-06-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. `PPCallbacks` seems to be missing the addition of `EnteredSubmodule` and `LeftSubmodule`; `PPChainedCallbacks` seems to be missing the addition of `LeftSubmodule`. Generally this seems reasonable. Comment at: lib/Lex/PPLexerChange.cpp:783 +if (Cal

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Sorry for the delay, Lingda. I tried to find some better solution for this. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponen

[PATCH] D63742: [WebAssembly] Implement Address Sanitizer for Emscripten

2019-06-25 Thread Guanzhong Chen via Phabricator via cfe-commits
quantum marked an inline comment as done. quantum added a comment. As for the name, I think `__global_base` matches the command line flag and makes it more clear what controls it, so I lean towards that. Comment at: lld/wasm/Writer.cpp:228 + if (WasmSym::GlobalBase) +Wasm

[PATCH] D62883: [analyzer] Track terminator conditions on which a tracked expressions depends

2019-06-25 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added a comment. I usually do the final update right before commiting. There still are non-accepted dependencies, who knows what'll happen. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:157

[PATCH] D63756: [AMDGPU] Increased the number of implicit argument bytes for both OpenCL and HIP (CLANG).

2019-06-25 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D63756#1557658 , @cdevadas wrote: > Hi Sam, > The compiler generates metadata for the first 48 bytes. I compiled a sample > code and verified it. The backend does nothing for the extra bytes now. > I will soon submit the backend

[PATCH] D60709: [ARM] Support inline assembler constraints for MVE.

2019-06-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp:14098 } + + case 2: Is this supposed to fallthrough from case 1 to case 2? Comment at: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp:14113 +

[PATCH] D60709: [ARM] Support inline assembler constraints for MVE.

2019-06-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: cfe/trunk/lib/Basic/Targets/ARM.cpp:912 + return true; +} case 'U': // a memory reference... Is this supposed to fallthrough from 'T' to 'U'? If so can you add an LLVM_FALLTHROUGH Repository: rL LLV

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Stephen Hines via Phabricator via cfe-commits
srhines accepted this revision. srhines added a comment. This revision is now accepted and ready to land. Craig, can you confirm that this is acceptable? I don't think there are any chips with SSE4.2 but without cx16, so this just seemed like an oversight. It might be a good idea to really audit

[PATCH] D60709: [ARM] Support inline assembler constraints for MVE.

2019-06-25 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364331: [ARM] Support inline assembler constraints for MVE. (authored by statham, committed by ). Changed prior to commit: https://reviews.llvm.org/D60709?vs=206455&id=206472#toc Repository: rL LLVM

r364331 - [ARM] Support inline assembler constraints for MVE.

2019-06-25 Thread Simon Tatham via cfe-commits
Author: statham Date: Tue Jun 25 09:49:32 2019 New Revision: 364331 URL: http://llvm.org/viewvc/llvm-project?rev=364331&view=rev Log: [ARM] Support inline assembler constraints for MVE. "To" selects an odd-numbered GPR, and "Te" an even one. There are some 8.1-M instructions that have one too few

[PATCH] D63760: [clangd] Address limitations in SelectionTree:

2019-06-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall planned changes to this revision. sammccall marked 2 inline comments as done. sammccall added a comment. Thanks for the comments here and the offline discussion. The problems identified were: - when a node's range is adjusted, then invisible parents (like ExprWithCleanups) don't adj

[PATCH] D63640: [clang] Improve Serialization/Imporing of APValues

2019-06-25 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 206467. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63640/new/ https://reviews.llvm.org/D63640 Files: clang/include/clang/AST/APValue.h clang/include/clang/AST/ASTContext.h clang/include/clang/AST/ASTImporter.h clang/include/clang/AST/Expr.h

[PATCH] D63640: [clang] Improve Serialization/Imporing of APValues

2019-06-25 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 206464. Tyker edited the summary of this revision. Tyker added a comment. Change: - Add support for LValue, MemberPointer and AddrDiffExpr. - Add tests for importing. i wasn't able to test for some APValueKinds: FixePoint, ComplexInt, ComplexFloat, AddrLabelD

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Is there some test for this area of code? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63774/new/ https://reviews.llvm.org/D63774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added reviewers: craig.topper, srhines. Herald added a subscriber: jfb. Herald added a project: clang. The android target assumes that for the x86_64 target, the CPU supports SSE4.2 and `popcnt`. This implies that the CPU is Nehalem or newer. This should

[PATCH] D63756: [AMDGPU] Increased the number of implicit argument bytes for both OpenCL and HIP (CLANG).

2019-06-25 Thread Christudasan Devadasan via Phabricator via cfe-commits
cdevadas added a comment. Hi Sam, The compiler generates metadata for the first 48 bytes. I compiled a sample code and verified it. The backend does nothing for the extra bytes now. I will soon submit the backend patch to generate the new metadata. Repository: rC Clang CHANGES SINCE LAST ACT

[PATCH] D63742: [WebAssembly] Implement Address Sanitizer for Emscripten

2019-06-25 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. I wonder if we should use the linux/unix convention or `edata` `etext` and `end`? Terrible names obviously but there is precedent. I can't remember why I didn't do that for __data_end and __heap_base. If not, then perhaps this should be called __data_start to match th

[PATCH] D48680: Add missing visibility annotation for __base

2019-06-25 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. The same problem occurs whether or not `exe.cpp` is compiled with`-fno-exceptions -fno-rtti`. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48680/new/ https://reviews.llvm.org/D48680 ___ cfe-

[PATCH] D63773: [clangd] dummy variable extraction on a function scope

2019-06-25 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah created this revision. SureYeaah added reviewers: sammccall, kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, mgorny. Herald added a project: clang. SureYeaah retitled this revision from "dummy variable extraction on a function scope" to "[clangd] dummy variable extrac

[PATCH] D63742: [WebAssembly] Implement Address Sanitizer for Emscripten

2019-06-25 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: lld/wasm/Writer.cpp:228 + if (WasmSym::GlobalBase) +WasmSym::GlobalBase->setVirtualAddress(Config->GlobalBase); + Surly if emscripten is passing in --global-base it already knows this value? Otherwise lgtm. Perh

[PATCH] D60709: [ARM] Support inline assembler constraints for MVE.

2019-06-25 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 206455. simon_tatham added a comment. Rebased this patch to current trunk, and also fixed a test failure by adding `arm_aapcs_vfpcc` to the test functions that use MVE vector types (since we can't support passing vector types in GPRs until we get all th

[PATCH] D63276: [AST] Add FunctionDecl::getParametersSourceRange()

2019-06-25 Thread Nicolas Manichon via Phabricator via cfe-commits
nicolas marked an inline comment as done. nicolas added inline comments. Comment at: clang/include/clang/AST/Decl.h:2331 + /// Attempt to compute an informative source range covering the + /// function parameters. This omits the ellipsis of a variadic function. + SourceRange g

[PATCH] D63559: [clangd] Added functionality for getting semantic highlights for variable and function declarations

2019-06-25 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 206450. jvikstrom added a comment. Made SemanticTokenCollector skip Decls not in the main file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63559/new/ https://reviews.llvm.org/D63559 Files: clang-tools-e

[PATCH] D63756: [AMDGPU] Increased the number of implicit argument bytes for both OpenCL and HIP (CLANG).

2019-06-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. can you try compile an empty HIP kernel and see what metadata is generated by backend? If I remember correctly, backend generates kernel arg metadata based on the number of implicit kernel args. It knows how to handle 48 but I am not sure what will happen if it becomes

[PATCH] D63559: [clangd] Added functionality for getting semantic highlights for variable and function declarations

2019-06-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. the test looks better now, another round of reviews, most are nits. Comment at: clang-tools-extra/clangd/SemanticHighlight.cpp:19 +class SemanticTokenCollector +: private RecursiveASTVisitor { + friend class RecursiveASTVisitor; nit

[PATCH] D63276: [AST] Add FunctionDecl::getParametersSourceRange()

2019-06-25 Thread Nicolas Manichon via Phabricator via cfe-commits
nicolas updated this revision to Diff 206446. nicolas added a comment. - Added tests of instance and static functions - Added tests of parameters with cv qualifiers - Added tests of parameters with attributes - Removed `auto` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63276/new/ http

[PATCH] D63760: [clangd] Address limitations in SelectionTree:

2019-06-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Also there were some offline discussions around, handling of "invisible nodes"(e.g, `ExprWithCleanups`) and other types of typelocs like ParenTypeLocs and owner of '=' sign in copy/move assignment constructors Comment at: clangd/Selection.cpp:54 + +

[PATCH] D62376: [ASTImporter] Mark erroneous nodes in shared st

2019-06-25 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 7 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7867 if (PosF != ImportedFromDecls.end()) { -if (LookupTable) +if (SharedState->getLookupTable()) if (auto *ToND = dyn_cast(ToD)) -

[PATCH] D62376: [ASTImporter] Mark erroneous nodes in shared st

2019-06-25 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206441. martong marked an inline comment as done. martong added a comment. - Encapsulate by adding addDeclToLookup and removeDeclFromLookup to the shared state Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D6237

[PATCH] D63759: [clangd] Don't rename the namespace.

2019-06-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/unittests/RenameTests.cpp:137 +// Parsing the .h file as C++ include. +TU.ExtraArgs.push_back("-xobjective-c++-header"); auto AST = TU.build(); sammccall wrote: > hokein wrote: > > sa

[PATCH] D63759: [clangd] Don't rename the namespace.

2019-06-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 206437. hokein marked an inline comment as done. hokein added a comment. Verify the error message in the test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63759/new/ https://reviews.llvm.org/D63759 Files: c

[PATCH] D63767: [NFC] Make some ObjectFormatType switches covering

2019-06-25 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast created this revision. hubert.reinterpretcast added reviewers: sfertile, jasonliu, daltenty. Herald added subscribers: jsji, aheejin. Herald added projects: clang, LLVM. This patch removes the `default` case from some switches on `llvm::Triple::ObjectFormatType`, and cases

[PATCH] D62376: [ASTImporter] Mark erroneous nodes in shared st

2019-06-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added a reviewer: balazske. martong marked 6 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7830 if (ToD) { +// Already imported (possibly from another TU) and with an error. +if (auto Error = SharedState->getI

[PATCH] D63763: [clang-tidy] Update documentation for Qt Creator integration.

2019-06-25 Thread Nikolai Kosjar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG181f252d5373: [clang-tidy] Update documentation for Qt Creator integration. (authored by nik). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63763/new/ http

  1   2   >