[PATCH] D41537: Optionally add code completion results for arrow instead of dot

2018-05-23 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 148164. yvvan marked 4 inline comments as done. https://reviews.llvm.org/D41537 Files: include/clang/Driver/CC1Options.td include/clang/Sema/CodeCompleteConsumer.h include/clang/Sema/CodeCompleteOptions.h include/clang/Sema/Sema.h lib/Frontend/ASTUnit

[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type

2018-05-23 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/AST/ASTContext.cpp:1775 +case BuiltinType::UShortAccum: Width = Target->getShortWidth(); Align = Target->getShortAlign(); Please give the types their own width and alignment accessors/variables in

[PATCH] D46960: [Fixed Point Arithmetic] Predefined Precision Macros

2018-05-23 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: include/clang/Lex/Preprocessor.h:185 + // Fractional bits of _Accum types + IdentifierInfo *Ident__SACCUM_FBIT__;// __SACCUM_FBIT__ + IdentifierInfo *Ident__ACCUM_FBIT__; // __ACCUM_FBIT__ You

Re: r332963 - Revert "Revert r332955 "GNUstep Objective-C ABI version 2""

2018-05-23 Thread Hans Wennborg via cfe-commits
Hi David, On Tue, May 22, 2018 at 12:13 PM, David Chisnall via cfe-commits wrote: > Author: theraven > Date: Tue May 22 03:13:06 2018 > New Revision: 332963 > > URL: http://llvm.org/viewvc/llvm-project?rev=332963&view=rev > Log: > Revert "Revert r332955 "GNUstep Objective-C ABI version 2"" > > Ad

[PATCH] D46911: [Fixed Point Arithmetic] Addition of the remaining fixed point types and their saturated equivalents

2018-05-23 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:206 +def err_invalid_saturation_spec : Error<"'%0' cannot be saturated. Only _Fract and _Accum can.">; def err_invalid_sign_spec : Error<"'%0' cannot be signed or unsigned">; ---

[clang-tools-extra] r333066 - [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-05-23 Thread Clement Courbet via cfe-commits
Author: courbet Date: Wed May 23 00:58:41 2018 New Revision: 333066 URL: http://llvm.org/viewvc/llvm-project?rev=333066&view=rev Log: [clang-tidy] new cppcoreguidelines-narrowing-conversions check. Summary: Checks for narrowing conversions, e.g. int i = 0; i += 0.1; This has what some might con

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-05-23 Thread Clement Courbet via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333066: [clang-tidy] new cppcoreguidelines-narrowing-conversions check. (authored by courbet, committed by ). Repository: rL LLVM https://reviews.llvm.org/D38455 Files: clang-tools-extra/trunk/clan

[PATCH] D47195: [clang-format] Fix putting ObjC message arguments in one line for multiline receiver

2018-05-23 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak updated this revision to Diff 148169. jolesiak added a comment. - Add test Repository: rC Clang https://reviews.llvm.org/D47195 Files: lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestObjC.cpp ===

[PATCH] D47195: [clang-format] Fix putting ObjC message arguments in one line for multiline receiver

2018-05-23 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak added inline comments. Comment at: unittests/Format/FormatTestObjC.cpp:815 + + // No line break before closing receiver's scope. + verifyFormat("[[obj a:42] a:42\n" krasimir wrote: > jolesiak wrote: > > krasimir wrote: > > > jolesiak wrote: > > > > kra

[PATCH] D47108: [CodeGenCXX] Add -fforce-emit-vtables

2018-05-23 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D47108#1109014, @rjmccall wrote: > I thought we already had places in Sema that marked inline virtual methods as > used, instantiated templates, etc. for devirtualization purposes when > optimization was enabled. Did we rip that out? I only

[PATCH] D47138: [Sparc] Use the leon arch for Leon3's when using an external assembler

2018-05-23 Thread Daniel Cederman via Phabricator via cfe-commits
dcederman updated this revision to Diff 148170. dcederman added a comment. Added missing tests. https://reviews.llvm.org/D47138 Files: lib/Driver/ToolChains/Arch/Sparc.cpp test/Driver/sparc-as.c Index: test/Driver/sparc-as.c =

Re: r332963 - Revert "Revert r332955 "GNUstep Objective-C ABI version 2""

2018-05-23 Thread David Chisnall via cfe-commits
On 23 May 2018, at 08:38, Hans Wennborg wrote: > > Hi David, > > On Tue, May 22, 2018 at 12:13 PM, David Chisnall via cfe-commits > wrote: >> Author: theraven >> Date: Tue May 22 03:13:06 2018 >> New Revision: 332963 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=332963&view=rev >> Log: >>

r333067 - Revert r333044 "Use zeroinitializer for (trailing zero portion of) large array initializers"

2018-05-23 Thread Hans Wennborg via cfe-commits
Author: hans Date: Wed May 23 01:24:01 2018 New Revision: 333067 URL: http://llvm.org/viewvc/llvm-project?rev=333067&view=rev Log: Revert r333044 "Use zeroinitializer for (trailing zero portion of) large array initializers" It caused asserts, see PR37560. > Use zeroinitializer for (trailing zer

Re: r332963 - Revert "Revert r332955 "GNUstep Objective-C ABI version 2""

2018-05-23 Thread Hans Wennborg via cfe-commits
Sounds good, thanks! On Wed, May 23, 2018 at 10:26 AM, David Chisnall wrote: > On 23 May 2018, at 08:38, Hans Wennborg wrote: >> >> Hi David, >> >> On Tue, May 22, 2018 at 12:13 PM, David Chisnall via cfe-commits >> wrote: >>> Author: theraven >>> Date: Tue May 22 03:13:06 2018 >>> New Revision

Re: r333044 - Use zeroinitializer for (trailing zero portion of) large array initializers

2018-05-23 Thread Hans Wennborg via cfe-commits
We're hitting asserts after this in Chromium. I've filed PR37560 and reverted in r333067. On Wed, May 23, 2018 at 2:09 AM, Richard Smith via cfe-commits wrote: > Author: rsmith > Date: Tue May 22 17:09:29 2018 > New Revision: 333044 > > URL: http://llvm.org/viewvc/llvm-project?rev=333044&view=rev

[PATCH] D46915: [Fixed Point Arithmetic] Set Fixed Point Precision Bits and Create Fixed Point Literals

2018-05-23 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. You should not define the fixed-point precision as compiler macros at build configure time. The number of fractional bits (the scaling factor) should be added to TargetInfo as target-configurable variables/accessors, and an accessor should be added to ASTContext (we cal

[PATCH] D46917: [Fixed Point Arithmetic] Comparison and Unary Operations for Fixed Point Types

2018-05-23 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:2141 + case BuiltinType::ShortAccum: +fbits = BUILTIN_SACCUM_FBIT; +break; Please see my comments on other patches about these values. Comment at: lib/

Re: r333044 - Use zeroinitializer for (trailing zero portion of) large array initializers

2018-05-23 Thread Richard Smith via cfe-commits
OK, thanks for the revert. On Wed, 23 May 2018, 01:28 Hans Wennborg via cfe-commits, < cfe-commits@lists.llvm.org> wrote: > We're hitting asserts after this in Chromium. I've filed PR37560 and > reverted in r333067. > > On Wed, May 23, 2018 at 2:09 AM, Richard Smith via cfe-commits > wrote: > >

[PATCH] D47247: Fix unaligned memory access when reading INPUT_FILE_OFFSETS data

2018-05-23 Thread Raphael Isemann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333069: Fix unaligned memory access when reading INPUT_FILE_OFFSETS data (authored by teemperor, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.or

r333069 - Fix unaligned memory access when reading INPUT_FILE_OFFSETS data

2018-05-23 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Wed May 23 02:02:40 2018 New Revision: 333069 URL: http://llvm.org/viewvc/llvm-project?rev=333069&view=rev Log: Fix unaligned memory access when reading INPUT_FILE_OFFSETS data Summary: The blob data is unaligned, so we also should read it as such. Should fix the random f

[PATCH] D46917: [Fixed Point Arithmetic] Comparison and Unary Operations for Fixed Point Types

2018-05-23 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:2178 +llvm::Value *amt = +llvm::ConstantInt::get(value->getType(), 1 << fbits, + /*isSigned=*/type->isSignedFixedPointType()); ebevhan wrote: > Use a

[PATCH] D46943: [clangd] Boost scores for decls from current file in completion

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D46943#1107880, @ilya-biryukov wrote: > I've added an initial version of testing for the matching header and wanted > to get feedback before proceeding further with tests and other changes. > > A few things that bug me so far: > > - We need to

[PATCH] D46927: [Fixed Point Arithmetic] Augmented Assignment for Fixed Point Types

2018-05-23 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: include/clang/AST/Type.h:6577 + +inline unsigned getFixedPointFBits(const QualType &Ty) { + return getFixedPointFBits(*Ty); As I mentioned in another patch, this should be in ASTContext and ask TargetInfo for the infor

[PATCH] D46986: [Fixed Point Arithmetic] Validation Test for Fixed Point Binary Operations and Saturated Addition

2018-05-23 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. I cannot say that I'm pleased with the CodeGen emission of the operations as pure IR. I can only assume that you do not have hardware specifically tailored for these operations, as matching this type of code ought to be quite difficult after optimization is performed.

[PATCH] D46986: [Fixed Point Arithmetic] Validation Test for Fixed Point Binary Operations and Saturated Addition

2018-05-23 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Also, this patch and all of the following 'Validation Test' patches do much more than just add tests, they add plenty of functionality as well. In general, it's quite difficult to tell which patches add what. I think it would be much clearer if the patches that claim to

[PATCH] D46862: [libclang] Optionally add code completion results for arrow instead of dot

2018-05-23 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 148177. yvvan added a comment. Output range of token being replaced instead of it's text As a side-effect introduce a call to get a Token starting from specified location. https://reviews.llvm.org/D46862 Files: include/clang-c/Index.h test/Index/complet

[PATCH] D47187: [clangd] Skip .inc headers when canonicalizing header #include.

2018-05-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. n Comment at: clangd/index/CanonicalIncludes.cpp:50 + if (I == Headers.end()) +return Headers[0]; // Fallback to the defining header. + llvm::StringRef Header = *

[PATCH] D47223: [clangd] Handle enumerators in named, unscoped enums similarly to scoped enums

2018-05-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a subscriber: sammccall. ilya-biryukov added a comment. I'm not sure if we have tests for that, but I remember that we kept the enumerators in the outer scope so that completion could find them.. Am I right that this patch will change the behavior and we won't get enumerators

[PATCH] D46501: [OpenCL] Guard all half float usage based on cl_khr_fp16 extension

2018-05-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D46501#1089777, @yaxunl wrote: > Only halfn type requires cl_khr_fp16. These functions do not use halfn type, > therefore cl_khr_fp16 is not required. I think the extension is for all half https://www.khronos.org/registry/OpenCL/sdk/1.2/d

[PATCH] D46501: [OpenCL] Guard all half float usage based on cl_khr_fp16 extension

2018-05-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Could you upload the full diff please, otherwise it's not easy to see all the functions guarded by the macro. Repository: rC Clang https://reviews.llvm.org/D46501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Comment at: test/SemaOpenCL/with_openmp.cl:1 +// RUN: %clang_cc1 -verify -fopenmp -ast-dump -x cl %s 2>&1 | FileCheck %s +// expected-no-diagnostics -

[PATCH] D46501: [OpenCL] Guard all half float usage based on cl_khr_fp16 extension

2018-05-23 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/Headers/opencl-c.h:12097 +#ifdef cl_khr_fp16 float __ovld vload_half(size_t offset, const __constant half *p); #if __OPENCL_C_VERSION__ >= CL_VERSION_2_0 These built-ins are part of the core specification, which does

[PATCH] D47251: Add a lit reproducer for PR37091

2018-05-23 Thread David Stenberg via Phabricator via cfe-commits
dstenb created this revision. Herald added a subscriber: cfe-commits. This adds a lit reproducer that verifies that no temporary assembly files are left behind when using clang-tidy with a target that does not support the internal assembler. The fix is in Tooling (https://reviews.llvm.org/D45686)

[PATCH] D45686: [Tooling] Clean up tmp files when creating a fixed compilation database

2018-05-23 Thread David Stenberg via Phabricator via cfe-commits
dstenb added a comment. Ping. We have added a lit reproducer for this now in clang-tools-extra: https://reviews.llvm.org/D47251. Repository: rC Clang https://reviews.llvm.org/D45686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D47095: [clang-format/ObjC] Correctly parse Objective-C methods with 'class' in name

2018-05-23 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:2137 + do { +if (FormatTok->Tok.isOneOf(tok::semi, tok::r_brace)) { + nextToken(); `tok::r_brace` could be skiped - see comment to line 2143. Comment at: l

r333060 - [analyzer] CStringChecker fix for strlcpy when no bytes are copied to the dest buffer

2018-05-23 Thread David Carlier via cfe-commits
Author: devnexen Date: Tue May 22 21:38:25 2018 New Revision: 333060 URL: http://llvm.org/viewvc/llvm-project?rev=333060&view=rev Log: [analyzer] CStringChecker fix for strlcpy when no bytes are copied to the dest buffer Again, strlc* does not return a pointer so the zero size case doest not fit

r333059 - This is a test commit.

2018-05-23 Thread David Carlier via cfe-commits
Author: devnexen Date: Tue May 22 21:27:39 2018 New Revision: 333059 URL: http://llvm.org/viewvc/llvm-project?rev=333059&view=rev Log: This is a test commit. Modified: cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt Modified: cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt URL: ht

[PATCH] D47187: [clangd] Skip .inc headers when canonicalizing header #include.

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 148189. ioeric marked 4 inline comments as done. ioeric added a comment. - Include main file in the include stack when mapping headers. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47187 Files: clangd/index/CanonicalIncludes.cpp clangd

[PATCH] D47187: [clangd] Skip .inc headers when canonicalizing header #include.

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolCollector.cpp:209 + while (true) { +if (!Loc.isValid() || SM.isInMainFile(Loc)) + break; sammccall wrote: > (as above, maybe want to include the main file for simplicity/symmetry) Thanks! As y

[PATCH] D44888: [RISCV] Add -mrelax/-mno-relax flags to enable/disable RISCV linker relaxation

2018-05-23 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. This is looking good to me, just needs an update to address this request for a test in riscv-features.c that demonstrates the default +relax/-relax setting. Repository: rL LLVM https://reviews.llvm.org/D44888 __

[PATCH] D10833: Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface

2018-05-23 Thread Ian Sunamura via Phabricator via cfe-commits
kent08ian added a comment. In https://reviews.llvm.org/D10833#970906, @milianw wrote: > still looks good to me. can someone else please review and commit this? Ping Repository: rC Clang https://reviews.llvm.org/D10833 ___ cfe-commits mailing l

r333080 - Test commit

2018-05-23 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed May 23 05:48:55 2018 New Revision: 333080 URL: http://llvm.org/viewvc/llvm-project?rev=333080&view=rev Log: Test commit Modified: cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt Modified: cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt URL: http://llvm.

[PATCH] D47155: [analyzer] Reduce simplifySVal complexity threshold further.

2018-05-23 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Hello! Thank you for addressing this problem. Are these kinds of symbols common in real code? For me it seems very artificial. However, I agree with George, it would be better to have this value as an analyzer option with a default value (of 20). Repository

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-05-23 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Can we continue the discussion here, please? We should involve Devin and/or George as well if we cannot agree ourselves. https://reviews.llvm.org/D35110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D47161: update

2018-05-23 Thread Anastasis via Phabricator via cfe-commits
gramanas added a comment. It was a mistake on my part with the arcanist tool. The documentation is fine, the only problems I encountered were due to my ignorance of how these systems work. Repository: rC Clang https://reviews.llvm.org/D47161 __

[PATCH] D46602: [clang-tidy] Store checks profiling info as YAML files

2018-05-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Ping. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47097: [DebugInfo] Preserve scope in auto generated StoreInst

2018-05-23 Thread Anastasis via Phabricator via cfe-commits
gramanas updated this revision to Diff 148198. gramanas added a comment. Set debug location to the entry block alloca Repository: rC Clang https://reviews.llvm.org/D47097 Files: lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExpr.cpp test/CodeGen/debug-info-preserve-scope.c Index: test/CodeGen

[PATCH] D47256: [clangd] Fix code completion in MACROs with stringification.

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, jkorous, MaskRay, klimek. Currently, we only handle the first callback from sema code completion and ignore results from potential following callbacks. This causes causes loss of completion

[PATCH] D47183: [clangd] Support multiple sema code completion callbacks.

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric abandoned this revision. ioeric added a comment. Dropping this in favor of https://reviews.llvm.org/D47256 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D47097: [DebugInfo] Preserve scope in auto generated StoreInst

2018-05-23 Thread Anastasis via Phabricator via cfe-commits
gramanas updated this revision to Diff 148200. gramanas marked an inline comment as done. gramanas added a comment. Remove redundant `this` Repository: rC Clang https://reviews.llvm.org/D47097 Files: lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExpr.cpp test/CodeGen/debug-info-preserve-scope.c

[PATCH] D45686: [Tooling] Clean up tmp files when creating a fixed compilation database

2018-05-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added reviewers: aaron.ballman, john.brawn, mehdi_amini, sammccall, zturner, bkramer. lebedev.ri added a comment. The testcase sounds reasonable. Can't comment on the actual fix. Adding some more reviewers that potentially worked on that source file. Repository: rC Clang https://r

[PATCH] D45686: [Tooling] Clean up tmp files when creating a fixed compilation database

2018-05-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Tooling/CompilationDatabase.cpp:303 + // Remove temp files. + Compilation->CleanupFileList(Compilation->getTempFiles()); + It seems to me that this would be best called from the destructor of the Compilation ob

[PATCH] D47257: [clang-format] Break template declarations followed by comments

2018-05-23 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added subscribers: cfe-commits, klimek. This patch fixes two bugs in clang-format where the template wrapper doesn't skip over comments causing a long template declaration to not be split into multiple lines. These were latent and exposed by r332436. Repo

[PATCH] D46950: [ASTImporter] Fix duplicate class template definitions problem

2018-05-23 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC333082: Fix duplicate class template definitions problem (authored by martong, committed by ). Changed prior to commit: https://reviews.llvm.org/D46950?vs=148013&id=148204#toc Repository: rC Clang h

[clang-tools-extra] r333083 - Replace last DEBUG occurrence with LLVM_DEBUG.

2018-05-23 Thread Nicola Zaghen via cfe-commits
Author: nzaghen Date: Wed May 23 06:57:48 2018 New Revision: 333083 URL: http://llvm.org/viewvc/llvm-project?rev=333083&view=rev Log: Replace last DEBUG occurrence with LLVM_DEBUG. Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp Modified: clang-tools-extra/trunk/clangd/CodeComplete

[PATCH] D47257: [clang-format] Break template declarations followed by comments

2018-05-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks for chasing this, good detective work! Changes look plausible and tests are nice, so LG assuming you know what you're doing. If you're unsure, Manuel will give you better advice th

[PATCH] D47256: [clangd] Fix code completion in MACROs with stringification.

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 148206. ioeric added a comment. - Fix broken test Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47256 Files: clangd/CodeComplete.cpp unittests/clangd/CodeCompleteTests.cpp Index: unittests/clangd/CodeCompleteTests.cpp =

[PATCH] D47137: [Sparc] Add floating-point register names

2018-05-23 Thread Daniel Cederman via Phabricator via cfe-commits
dcederman updated this revision to Diff 148205. dcederman added a comment. Herald added a subscriber: eraman. Added test cases, f32-f63, d0-d31, and q0-q15. https://reviews.llvm.org/D47137 Files: lib/Basic/Targets/Sparc.cpp test/CodeGen/sparcv8-inline-asm.c test/CodeGen/sparcv9-inline-as

r333085 - [clang-format] Break template declarations followed by comments

2018-05-23 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Wed May 23 07:18:19 2018 New Revision: 333085 URL: http://llvm.org/viewvc/llvm-project?rev=333085&view=rev Log: [clang-format] Break template declarations followed by comments Summary: This patch fixes two bugs in clang-format where the template wrapper doesn't skip over c

[PATCH] D47257: [clang-format] Break template declarations followed by comments

2018-05-23 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333085: [clang-format] Break template declarations followed by comments (authored by krasimir, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D472

[PATCH] D47057: [ASTImporter] Fix missing implict CXXRecordDecl in ClassTemplateSpecializationDecl

2018-05-23 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 148209. martong added a comment. Remove multiline comment and reorder parts of the condition Repository: rC Clang https://reviews.llvm.org/D47057 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp Index: unittests/AST/ASTImporterTest.

[PATCH] D47057: [ASTImporter] Fix missing implict CXXRecordDecl in ClassTemplateSpecializationDecl

2018-05-23 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333086: [ASTImporter] Fix missing implict CXXRecordDecl in… (authored by martong, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47057 Files:

[PATCH] D47057: [ASTImporter] Fix missing implict CXXRecordDecl in ClassTemplateSpecializationDecl

2018-05-23 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC333086: [ASTImporter] Fix missing implict CXXRecordDecl in… (authored by martong, committed by ). Changed prior to commit: https://reviews.llvm.org/D47057?vs=148209&id=148210#toc Repository: rL LLVM

[PATCH] D45686: [Tooling] Clean up tmp files when creating a fixed compilation database

2018-05-23 Thread David Stenberg via Phabricator via cfe-commits
dstenb added inline comments. Comment at: lib/Tooling/CompilationDatabase.cpp:303 + // Remove temp files. + Compilation->CleanupFileList(Compilation->getTempFiles()); + erichkeane wrote: > It seems to me that this would be best called from the destructor of the

[PATCH] D45686: [Tooling] Clean up tmp files when creating a fixed compilation database

2018-05-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Tooling/CompilationDatabase.cpp:303 + // Remove temp files. + Compilation->CleanupFileList(Compilation->getTempFiles()); + dstenb wrote: > erichkeane wrote: > > It seems to me that this would be best called from

[PATCH] D47063: [clangd] Keep only a limited number of idle ASTs in memory

2018-05-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. (Haven't reviewed the code yet, just design stuff) I'm tempted to push back on the idea that we need to store any - "if it's fast enough for code complete, it's fast enough for GTD". But that's probably oversimplifying - we don't force reuse of a stable preamble for GT

[PATCH] D47260: Testcase for dwarf 5 crash/assert when calculating a checksum for an expansion

2018-05-23 Thread Tom Rix via Phabricator via cfe-commits
trixirt created this revision. trixirt added a reviewer: probinson. Herald added subscribers: cfe-commits, JDevlieghere, aprantl. Test is a reduction from running csmith with -gdwarf-5 The checksums are required for all 'files'. The clang source manager does not provide them for expansions. Repo

[PATCH] D47187: [clangd] Skip .inc headers when canonicalizing header #include.

2018-05-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/index/CanonicalIncludes.cpp:54 + StringRef Header = *I; + if (!isLiteralInclude(Header)) { +// If Header is not expected be included (e.g. .cc file), we fall back to headers are paths, not , right? =

[PATCH] D47260: Testcase for dwarf 5 crash/assert when calculating a checksum for an expansion

2018-05-23 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a reviewer: rnk. probinson added a subscriber: rnk. probinson added a comment. + @rnk who did the initial checksum stuff for CodeView. I am unclear how the notion of checksums should interact with preprocessed files. Nit: while many tests have dates in the filenames, we no longe

[PATCH] D45212: [HIP] Let CUDA toolchain support HIP language mode and amdgpu

2018-05-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 19 inline comments as done. yaxunl added a comment. In https://reviews.llvm.org/D45212#1105177, @tra wrote: > Hi, > > Sorry about the long silence. I'm back to continue the reviews. I'll handle > what I can today and will continue with the rest on Tuesday. > > It looks like patch d

r333086 - [ASTImporter] Fix missing implict CXXRecordDecl in ClassTemplateSpecializationDecl

2018-05-23 Thread Gabor Marton via cfe-commits
Author: martong Date: Wed May 23 07:24:02 2018 New Revision: 333086 URL: http://llvm.org/viewvc/llvm-project?rev=333086&view=rev Log: [ASTImporter] Fix missing implict CXXRecordDecl in ClassTemplateSpecializationDecl Summary: Currently we do not import the implicit CXXRecordDecl of a ClassTempla

r333082 - Fix duplicate class template definitions problem

2018-05-23 Thread Gabor Marton via cfe-commits
Author: martong Date: Wed May 23 06:53:36 2018 New Revision: 333082 URL: http://llvm.org/viewvc/llvm-project?rev=333082&view=rev Log: Fix duplicate class template definitions problem Summary: We fail to import a `ClassTemplateDecl` if the "To" context already contains a definition and then a forw

[PATCH] D45212: Add HIP toolchain

2018-05-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 148216. yaxunl marked 19 inline comments as done. yaxunl retitled this revision from "[HIP] Let CUDA toolchain support HIP language mode and amdgpu" to "Add HIP toolchain". yaxunl edited the summary of this revision. yaxunl added a comment. Herald added a subsc

[PATCH] D47187: [clangd] Skip .inc headers when canonicalizing header #include.

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 148218. ioeric marked 3 inline comments as done. ioeric added a comment. - addressed comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47187 Files: clangd/index/CanonicalIncludes.cpp clangd/index/CanonicalIncludes.h clangd/index

[PATCH] D47262: [VFS] Implement getRealPath in InMemoryFileSystem.

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: bkramer. Repository: rC Clang https://reviews.llvm.org/D47262 Files: include/clang/Basic/VirtualFileSystem.h lib/Basic/VirtualFileSystem.cpp unittests/Basic/VirtualFileSystemTest.cpp Index: unittests/Basic/VirtualFileSystemTest.cpp

r333092 - [clang-format] fix buildbots after r333085

2018-05-23 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Wed May 23 08:21:33 2018 New Revision: 333092 URL: http://llvm.org/viewvc/llvm-project?rev=333092&view=rev Log: [clang-format] fix buildbots after r333085 Old gcc versions don't like raw string literals in macros. Modified: cfe/trunk/unittests/Format/FormatTest.cpp Mo

[PATCH] D47190: [Driver] Add -ivfsoverlay-lib option to load VFS from shared library

2018-05-23 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic updated this revision to Diff 148225. asavonic added a comment. Fixed warning about void* to function pointer cast. Repository: rC Clang https://reviews.llvm.org/D47190 Files: include/clang/Driver/Options.td include/clang/Lex/HeaderSearchOptions.h lib/Frontend/CompilerInvocati

[PATCH] D47196: [Time-report ](2): Recursive timers in Clang

2018-05-23 Thread Andrew V. Tischenko via Phabricator via cfe-commits
avt77 updated this revision to Diff 148226. avt77 added a comment. - switched to llvm::sort - from std::sort (tnx to mgrang) - added a new counter (hope it will improve the output numbers) - slightly changed a couple of existing counters - seriously improved debug/monitor logging https://review

[PATCH] D47137: [Sparc] Add floating-point register names

2018-05-23 Thread James Y Knight via Phabricator via cfe-commits
jyknight added inline comments. Comment at: lib/Basic/Targets/Sparc.cpp:32 +"f22", "f23", "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", "f32", +"f33", "f34", "f35", "f36", "f37", "f38", "f39", "f40", "f41", "f42", "f43", +"f44", "f45", "f46", "f47", "f48",

[PATCH] D47260: Testcase for dwarf 5 crash/assert when calculating a checksum for an expansion

2018-05-23 Thread Tom Rix via Phabricator via cfe-commits
trixirt updated this revision to Diff 148228. trixirt added a comment. Rename test to dwarf5-expansion-checksum.c Repository: rC Clang https://reviews.llvm.org/D47260 Files: test/CodeGen/dwarf5-expansion-checksum.c Index: test/CodeGen/dwarf5-expansion-checksum.c =

[PATCH] D40221: [clang-format] Parse blocks in braced lists

2018-05-23 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton edited reviewers, added: klimek; removed: djasper. benhamilton added a comment. @djasper isn't available to review. At a high level, this seems good, but I'd like @klimek to take a look. Comment at: lib/Format/UnwrappedLineParser.cpp:1320 +// \endcode +bool Unwrapp

[PATCH] D47095: [clang-format/ObjC] Correctly parse Objective-C methods with 'class' in name

2018-05-23 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:2137 + do { +if (FormatTok->Tok.isOneOf(tok::semi, tok::r_brace)) { + nextToken(); jolesiak wrote: > `tok::r_brace` could be skiped - see comment to line 2143. Done. ===

[PATCH] D47095: [clang-format/ObjC] Correctly parse Objective-C methods with 'class' in name

2018-05-23 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 148231. benhamilton marked 2 inline comments as done. benhamilton added a comment. @jolesiak Repository: rC Clang https://reviews.llvm.org/D47095 Files: lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/Format

[PATCH] D47267: [UnrollAndJam] Add unroll_and_jam pragma handling

2018-05-23 Thread Dave Green via Phabricator via cfe-commits
dmgreen created this revision. dmgreen added reviewers: SjoerdMeijer, hfinkel, tyler.nowicki, anemet, alexfh. Herald added a subscriber: zzheng. This adds support for the unroll_and_jam pragma, to go with https://reviews.llvm.org/D41953. The name of the pragma is copied from the Intel compiler, a

[PATCH] D47182: [X86] Move all Intel defined intrinsic includes into immintrin.h

2018-05-23 Thread David Kreitzer via Phabricator via cfe-commits
DavidKreitzer added a comment. Hi Craig, just one comment on the details. Everything else looks good. Comment at: lib/Headers/x86intrin.h:47 - -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__POPCNT__) -#include I see that you are removing this p

[PATCH] D47267: [UnrollAndJam] Add unroll_and_jam pragma handling

2018-05-23 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. > I have some doubts whether this will ever be used sensibly in the real world, > but can > be useful for testing and was not difficult to put together. I definitely support having pragmas for these kinds of loop transformations. In my experience, they are used. http

[PATCH] D47268: [CUDA] Fixed the list of GPUs supported by CUDA-9

2018-05-23 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added reviewers: jlebar, klimek. Herald added subscribers: bixia, sanjoy. Removed sm_20 as it is not supported by CUDA-9. Added sm_37. https://reviews.llvm.org/D47268 Files: clang/lib/Driver/ToolChains/Cuda.cpp Index: clang/lib/Driver/ToolChains/Cuda.cpp =

[PATCH] D47137: [Sparc] Add floating-point register names

2018-05-23 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: lib/Basic/Targets/Sparc.cpp:52 + +// Double precision floating-point register +{{"d0"}, "f0"}, {{"d1"}, "f2"}, {{"d2"}, "f4"}, {{"d3"}, "f6"}, jyknight wrote: > AFAICT, gcc doesn't actually accept "d" and "q

[PATCH] D47260: Testcase for dwarf 5 crash/assert when calculating a checksum for an expansion

2018-05-23 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. After thinking about this a bit... The # directive will cause the filename to be identified as the source for the subsequent lines. That means it will show up as the original source file in the line table. However, the compiler doesn't have the actual source file of

[PATCH] D42933: [Sema] Avoid -Wformat warning for NSInteger/NSUInteger 'int' values with %zu/%zi long specifiers

2018-05-23 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. Based on the cfe-dev discussion we'll want to handle the case of NSInteger with `%z` format on Darwin separately from other attempts at portability warnings in printf formats. I'll therefore re-post this patch

r333098 - [CUDA] Fixed the list of GPUs supported by CUDA-9.

2018-05-23 Thread Artem Belevich via cfe-commits
Author: tra Date: Wed May 23 09:45:23 2018 New Revision: 333098 URL: http://llvm.org/viewvc/llvm-project?rev=333098&view=rev Log: [CUDA] Fixed the list of GPUs supported by CUDA-9. Differential Revision: https://reviews.llvm.org/D47268 Modified: cfe/trunk/lib/Driver/ToolChains/Cuda.cpp Modi

[PATCH] D47063: [clangd] Keep only a limited number of idle ASTs in memory

2018-05-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Having taken a closer look, I think the cache can be simplified/separated a bit more cleanly by returning shared pointers and not allowing lookups, instead restoring limited ownership in CppFile... Happy to discuss more, esp if you might disagree :) ===

[PATCH] D47268: [CUDA] Fixed the list of GPUs supported by CUDA-9

2018-05-23 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC333098: [CUDA] Fixed the list of GPUs supported by CUDA-9. (authored by tra, committed by ). Changed prior to commit: https://reviews.llvm.org/D47268?vs=148232&id=148236#toc Repository: rC Clang htt

[PATCH] D47267: [UnrollAndJam] Add unroll_and_jam pragma handling

2018-05-23 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. This is straightforward in that it clones the implementation of `#pragma unroll` for `unroll_and_jam`. Hence, it also shares the same problem of clang's LoopHints, namely that the order of loop transformations (if there are multiple on the same loop: loop distributi

[PATCH] D46943: [clangd] Boost scores for decls from current file in completion

2018-05-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D46943#1109199, @ioeric wrote: > > - Symbols store their paths as URIs ⇒ we need to parse them in order to > > apply heuristics. We could avoid that by writing a version of > > header-matching that also works on URIs, but that would mea

[clang-tools-extra] r333100 - [Documentation] Move some Clang-tidy changes to proper sections.

2018-05-23 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed May 23 10:25:22 2018 New Revision: 333100 URL: http://llvm.org/viewvc/llvm-project?rev=333100&view=rev Log: [Documentation] Move some Clang-tidy changes to proper sections. Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst Modified: clang-tools-extra/tru

[PATCH] D46944: [analyzer] Use sufficiently large types for index/size calculation.

2018-05-23 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Bevin, Could you please address these comments? Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:89 SymMgr(context, BasicVals, alloc), MemMgr(context, alloc), -StateMgr(stateMgr), ArrayIndexTy(context.Long

[libcxx] r333103 - Teach __libcpp_is_floating_point that __fp16 and _Float16 are

2018-05-23 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed May 23 10:31:09 2018 New Revision: 333103 URL: http://llvm.org/viewvc/llvm-project?rev=333103&view=rev Log: Teach __libcpp_is_floating_point that __fp16 and _Float16 are floating-point types. rdar://problem/40377353 Added: libcxx/trunk/test/libcxx/type_traits/is_fl

r333094 - Test Commit. Fix namespace comment

2018-05-23 Thread Mikhail R. Gadelha via cfe-commits
Author: mramalho Date: Wed May 23 08:49:12 2018 New Revision: 333094 URL: http://llvm.org/viewvc/llvm-project?rev=333094&view=rev Log: Test Commit. Fix namespace comment Signed-off-by: Mikhail Ramalho Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SimpleConstraintManag

[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type

2018-05-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a subscriber: sammccall. leonardchan added inline comments. Comment at: include/clang/Basic/DiagnosticCommonKinds.td:172 +def err_fixed_point_only_allowed_in_c : Error< + "Fixed point types are only allowed in C">; rsmith wrote: > Diagnostics

  1   2   >