[PATCH] D47191: [clang-format] Fix crash in getLengthToMatchingParen

2018-05-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Added a test in https://reviews.llvm.org/rL332974. Didn't add a test case and didn't wait for review. Sorry about that! Repository: rL LLVM https://reviews.llvm.org/D47191 ___ cfe-commits mailing list

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

2018-05-22 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. @rjmccall do you have any thoughts on the best way to solve it? Repository: rL LLVM https://reviews.llvm.org/D47108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46052: GNUstep Objective-C ABI version 2

2018-05-22 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: lib/CodeGen/CGObjCGNU.cpp:1056 +char c = Str[i]; +if (isalpha(c) || isnumber(c)) + StringName += c; GBuella wrote: > theraven wrote: > > Ka-Ka wrote: > > > The isnumber() function was added to

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

2018-05-22 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: lib/Sema/CodeCompleteConsumer.cpp:559 +const char *Begin = +SemaRef.SourceMgr.getCharacterData(FixIt.RemoveRange.getBegin()); +const char *End = ilya-biryukov wrote: > Unfortunately, that might

[PATCH] D47065: [clangd] Enable parsing of non-doxygen comments in global-symbol-builder

2018-05-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D47065#1104730, @ioeric wrote: > Should we also change the behavior in dynamic index? Dynamic index already uses whatever AST provides (which is `ParseAllComments = true` since https://reviews.llvm.org/D46002) Repository: rCTE

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

2018-05-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/CodeComplete.cpp:457 Result.StartsNestedNameSpecifier = false; + // FIXME: the same result can be added multiple times as the callback can + // be called more than once. We may want to deduplicate identical

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

2018-05-22 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic created this revision. Herald added a subscriber: mgorny. This patch allows clang to use a VirtualFileSystem represented by a shared library. This VFS will be used on top of the real file system. Library specified -ivfsoverlay-lib by must export `clang::vfs::FileSystem

r332966 - [objc-gnustep2] Use unsigned char to avoid potential UB in isalnum.

2018-05-22 Thread David Chisnall via cfe-commits
Author: theraven Date: Tue May 22 03:13:17 2018 New Revision: 332966 URL: http://llvm.org/viewvc/llvm-project?rev=332966=rev Log: [objc-gnustep2] Use unsigned char to avoid potential UB in isalnum. Suggested by Gabor Buella. Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Modified:

r332965 - [objc-gnu] Fix test.

2018-05-22 Thread David Chisnall via cfe-commits
Author: theraven Date: Tue May 22 03:13:14 2018 New Revision: 332965 URL: http://llvm.org/viewvc/llvm-project?rev=332965=rev Log: [objc-gnu] Fix test. The test was implicitly capturing the local filesystem layout. Patch by Hans Wennborg! Modified: cfe/trunk/test/CodeGenObjC/gnu-init.m

r332964 - [objc-gnustep2] Use isalnum instead of a less efficient and nonportable equivalent.

2018-05-22 Thread David Chisnall via cfe-commits
Author: theraven Date: Tue May 22 03:13:11 2018 New Revision: 332964 URL: http://llvm.org/viewvc/llvm-project?rev=332964=rev Log: [objc-gnustep2] Use isalnum instead of a less efficient and nonportable equivalent. Patch by Hans Wennborg! Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp

r332974 - [clang-format] Add a test case for crash

2018-05-22 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Tue May 22 04:44:03 2018 New Revision: 332974 URL: http://llvm.org/viewvc/llvm-project?rev=332974=rev Log: [clang-format] Add a test case for crash Modified: cfe/trunk/unittests/Format/FormatTest.cpp Modified: cfe/trunk/unittests/Format/FormatTest.cpp URL:

[PATCH] D45438: [CodeView] Enable debugging of captured variables within C++ lambdas

2018-05-22 Thread Brock Wyma via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332975 (authored by bwyma, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org/D45438?vs=146612=147988#toc Repository: rC Clang

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

2018-05-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/CodeComplete.cpp:457 Result.StartsNestedNameSpecifier = false; + // FIXME: the same result can be added multiple times as the callback can + // be called more than once. We may want to deduplicate identical

[PATCH] D46052: GNUstep Objective-C ABI version 2

2018-05-22 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: lib/CodeGen/CGObjCGNU.cpp:1056 +char c = Str[i]; +if (isalpha(c) || isnumber(c)) + StringName += c; theraven wrote: > Ka-Ka wrote: > > The isnumber() function was added to cctype.h by Apple. I

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

2018-05-22 Thread Daniel Cederman via Phabricator via cfe-commits
dcederman updated this revision to Diff 147965. dcederman added a comment. Also use the leon arch for the Myriad processors. https://reviews.llvm.org/D47138 Files: lib/Driver/ToolChains/Arch/Sparc.cpp Index: lib/Driver/ToolChains/Arch/Sparc.cpp

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

2018-05-22 Thread Daniel Cederman via Phabricator via cfe-commits
dcederman added a comment. In https://reviews.llvm.org/D47138#1106509, @jyknight wrote: > Separately, I think it'd be a good idea to refactor to put this info into the > SparcCPUInfo struct, so that it's harder for them to get out of sync. I did not find a good way to access the SparcCPUInfo

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

2018-05-22 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic updated this revision to Diff 147974. asavonic added a comment. Add license header. https://reviews.llvm.org/D47190 Files: include/clang/Driver/Options.td include/clang/Lex/HeaderSearchOptions.h lib/Frontend/CompilerInvocation.cpp unittests/Frontend/CMakeLists.txt

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

2018-05-22 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:4109 + if (CodeCompleter->includeFixIts()) { +const SourceRange OpRange(OpLoc, OpLoc.getLocWithOffset(IsArrow ? 2 : 1)); +CompletionSucceded = ilya-biryukov wrote: > yvvan wrote: > >

Re: r332885 - CodeGen, Driver: Start using direct split dwarf emission in clang.

2018-05-22 Thread Amara Emerson via cfe-commits
> On 21 May 2018, at 21:31, Peter Collingbourne via cfe-commits > wrote: > > Author: pcc > Date: Mon May 21 13:31:59 2018 > New Revision: 332885 > > URL: http://llvm.org/viewvc/llvm-project?rev=332885=rev > Log: > CodeGen, Driver: Start using direct split dwarf

[PATCH] D47058: [ASTImporter] Fix ClassTemplateSpecialization in wrong DC

2018-05-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:4305 +// Add to the DC only if it was an explicit specialization/instantiation. +if (D2->getTemplateSpecializationKind() != TSK_ImplicitInstantiation) { + LexicalDC->addDeclInternal(D2);

[PATCH] D47191: [clang-format] Fix crash in getLengthToMatchingParen

2018-05-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added subscribers: cfe-commits, klimek. Found by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8212 Repository: rC Clang https://reviews.llvm.org/D47191 Files: lib/Format/ContinuationIndenter.cpp Index:

[PATCH] D47191: [clang-format] Fix crash in getLengthToMatchingParen

2018-05-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL332961: [clang-format] Fix crash in getLengthToMatchingParen (authored by krasimir, committed by ). Herald added a

[PATCH] D47191: [clang-format] Fix crash in getLengthToMatchingParen

2018-05-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. No test? Repository: rL LLVM https://reviews.llvm.org/D47191 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47195: [clang-format] Fix ObjC message arguments handling

2018-05-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir 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" What's the receiver's scope in this comment referring to? Also, how would the old test

r332988 - [CodeGen] add tests for abs builtins; NFC

2018-05-22 Thread Sanjay Patel via cfe-commits
Author: spatel Date: Tue May 22 08:11:59 2018 New Revision: 332988 URL: http://llvm.org/viewvc/llvm-project?rev=332988=rev Log: [CodeGen] add tests for abs builtins; NFC Added: cfe/trunk/test/CodeGen/builtin-abs.c Added: cfe/trunk/test/CodeGen/builtin-abs.c URL:

r332989 - [CodeGen] produce the LLVM canonical form of abs

2018-05-22 Thread Sanjay Patel via cfe-commits
Author: spatel Date: Tue May 22 08:36:50 2018 New Revision: 332989 URL: http://llvm.org/viewvc/llvm-project?rev=332989=rev Log: [CodeGen] produce the LLVM canonical form of abs We chose the 'slt' form as canonical in IR with: rL332819 ...so we should generate that form directly for efficiency.

[PATCH] D47202: [CodeGen] use nsw negation for abs

2018-05-22 Thread Sanjay Patel via Phabricator via cfe-commits
spatel created this revision. spatel added reviewers: craig.topper, efriedma, lebedev.ri. Herald added a subscriber: mcrosier. The clang builtins have the same semantics as the stdlib functions. The stdlib functions are defined in section 7.20.6.1 of the C standard with: "If the result cannot be

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-05-22 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added inline comments. Comment at: include/charconv:89 +_LIBCPP_BEGIN_NAMESPACE_STD + +enum class _LIBCPP_ENUM_VIS chars_format mclow.lists wrote: > lichray wrote: > > EricWF wrote: > > > We need to hide these names when `_LIBCPP_STD_VER < 17`, since

[clang-tools-extra] r332978 - [clangd] Fix a typo. NFC

2018-05-22 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Tue May 22 06:29:37 2018 New Revision: 332978 URL: http://llvm.org/viewvc/llvm-project?rev=332978=rev Log: [clangd] Fix a typo. NFC Modified: clang-tools-extra/trunk/clangd/ClangdServer.cpp Modified: clang-tools-extra/trunk/clangd/ClangdServer.cpp URL:

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

2018-05-22 Thread Andrew V. Tischenko via Phabricator via cfe-commits
avt77 created this revision. avt77 added reviewers: RKSimon, simon.f.whittaker, mgorny, russell.gallop, efriedma, rsmith, mzolotukhin, davezarzycki, vsk. Herald added a subscriber: mgrang. I introduce the new infrastructure supporting recursive timers in Clang. This patch is based on

r332982 - Call CreateTempMemWithoutCast for ActiveFlag

2018-05-22 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue May 22 07:36:26 2018 New Revision: 332982 URL: http://llvm.org/viewvc/llvm-project?rev=332982=rev Log: Call CreateTempMemWithoutCast for ActiveFlag Introduced CreateMemTempWithoutCast and CreateTemporaryAllocaWithoutCast to emit alloca without casting to default addr

[PATCH] D47099: Call CreateTempAllocaWithoutCast for ActiveFlag

2018-05-22 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332982: Call CreateTempMemWithoutCast for ActiveFlag (authored by yaxunl, committed by ). Repository: rC Clang https://reviews.llvm.org/D47099 Files: lib/CodeGen/CGCall.cpp

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

2018-05-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 148006. ilya-biryukov added a comment. Herald added a subscriber: mgorny. - Move helpers tha switch header and source into separate files. - Also uprank items coming from the matching headers Repository: rCTE Clang Tools Extra

[PATCH] D47058: [ASTImporter] Fix ClassTemplateSpecialization in wrong DC

2018-05-22 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 147966. martong marked an inline comment as done. martong added a comment. Use isExplicitInstantiationOrSpecialization Repository: rC Clang https://reviews.llvm.org/D47058 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp Index:

r332961 - [clang-format] Fix crash in getLengthToMatchingParen

2018-05-22 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Tue May 22 02:46:55 2018 New Revision: 332961 URL: http://llvm.org/viewvc/llvm-project?rev=332961=rev Log: [clang-format] Fix crash in getLengthToMatchingParen Summary: Found by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8212 Reviewers: bkramer

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

2018-05-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:4109 + if (CodeCompleter->includeFixIts()) { +const SourceRange OpRange(OpLoc, OpLoc.getLocWithOffset(IsArrow ? 2 : 1)); +CompletionSucceded = yvvan wrote: > ilya-biryukov

[PATCH] D47193: clang-format: [JS] do not wrap before any `is`.

2018-05-22 Thread Martin Probst via Phabricator via cfe-commits
mprobst created this revision. mprobst added a reviewer: krasimir. Herald added subscribers: cfe-commits, klimek. `is` type annotations can occur at any nesting level. For example: function x() { return function y(): a is B { ... }; } Breaking before the `is` above breaks TypeScript

[PATCH] D47193: clang-format: [JS] do not wrap before any `is`.

2018-05-22 Thread Martin Probst via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332968: clang-format: [JS] do not wrap before any `is`. (authored by mprobst, committed by ). Changed prior to commit: https://reviews.llvm.org/D47193?vs=147978=147979#toc Repository: rC Clang

r332968 - clang-format: [JS] do not wrap before any `is`.

2018-05-22 Thread Martin Probst via cfe-commits
Author: mprobst Date: Tue May 22 03:39:07 2018 New Revision: 332968 URL: http://llvm.org/viewvc/llvm-project?rev=332968=rev Log: clang-format: [JS] do not wrap before any `is`. Summary: `is` type annotations can occur at any nesting level. For example: function x() { return function

r332973 - Revert "CodeGen, Driver: Start using direct split dwarf emission in clang."

2018-05-22 Thread Amara Emerson via cfe-commits
Author: aemerson Date: Tue May 22 04:18:58 2018 New Revision: 332973 URL: http://llvm.org/viewvc/llvm-project?rev=332973=rev Log: Revert "CodeGen, Driver: Start using direct split dwarf emission in clang." This reverts commit r332885 as it broke several greendragon buildbots. Removed:

r332972 - Revert "Fix another make_unique ambiguity."

2018-05-22 Thread Amara Emerson via cfe-commits
Author: aemerson Date: Tue May 22 04:18:49 2018 New Revision: 332972 URL: http://llvm.org/viewvc/llvm-project?rev=332972=rev Log: Revert "Fix another make_unique ambiguity." This reverts commit r332906 as a dependency to revert r332885. Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp

r332971 - Revert "Add missing x86-registered-target."

2018-05-22 Thread Amara Emerson via cfe-commits
Author: aemerson Date: Tue May 22 04:18:43 2018 New Revision: 332971 URL: http://llvm.org/viewvc/llvm-project?rev=332971=rev Log: Revert "Add missing x86-registered-target." This reverts commit r332911, as a dependency to revert r332885. Modified: cfe/trunk/test/Misc/cc1as-split-dwarf.s

[PATCH] D46541: [CodeGen] Improve diagnostics related to target attributes

2018-05-22 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 147984. https://reviews.llvm.org/D46541 Files: lib/CodeGen/CodeGenFunction.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h test/CodeGen/target-features-error-2.c test/CodeGen/target-features-error.c Index:

[PATCH] D46541: [CodeGen] Improve diagnostics related to target attributes

2018-05-22 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. In https://reviews.llvm.org/D46541#1106743, @craig.topper wrote: > I think you can pass StringRef(F).substr(1). That won't create a temporary > string. It will just create a StringRef pointing into the middle of an > existing std::string stored in the parsed

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

2018-05-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. 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 match headers of items from the index, not only from the Sema

r332975 - [CodeView] Enable debugging of captured variables within C++ lambdas

2018-05-22 Thread Brock Wyma via cfe-commits
Author: bwyma Date: Tue May 22 05:41:19 2018 New Revision: 332975 URL: http://llvm.org/viewvc/llvm-project?rev=332975=rev Log: [CodeView] Enable debugging of captured variables within C++ lambdas This change will help Visual Studio resolve forward references to C++ lambda routines used by

[PATCH] D47142: [x86] invpcid intrinsic

2018-05-22 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 148011. https://reviews.llvm.org/D47142 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/Headers/CMakeLists.txt lib/Headers/cpuid.h lib/Headers/invpcidintrin.h

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

2018-05-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. OK, it turned out that there are a few things that I overlooked: 1. Top-N Ranking would be broken among different callbacks. We would need to keep a single `TopN` for all callbacks. 2. Due to 1), materialization of TopN candidates would happen after all callbacks have

[PATCH] D47195: [clang-format] Fix ObjC message arguments handling

2018-05-22 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. This revision is now accepted and ready to land. Please address @krasimir's comments, but looks good to me. Repository: rC Clang https://reviews.llvm.org/D47195 ___ cfe-commits

[PATCH] D47195: [clang-format] Fix ObjC message arguments handling

2018-05-22 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: > What's the receiver's scope in this comment referring to? > Also,

[PATCH] D47200: [Sema] Add tests for weak functions

2018-05-22 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld created this revision. Hahnfeld added reviewers: aaron.ballman, rjmccall. Herald added a subscriber: cfe-commits. I found these checks to be missing, just add some simple cases. Repository: rC Clang https://reviews.llvm.org/D47200 Files: test/Sema/attr-weak.c Index:

[PATCH] D47201: [CUDA] Implement nv_weak attribute for functions

2018-05-22 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld created this revision. Hahnfeld added a reviewer: tra. Herald added a subscriber: cfe-commits. This is needed for relocatable device code with CUDA 9 and later. Before this patch, linking two or more object files resulted in "Multiple definition" errors for a group of functions from

[PATCH] D41347: [libc++] Lift std::errc into a separated header

2018-05-22 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added a comment. In https://reviews.llvm.org/D41347#1099842, @mclow.lists wrote: > Sorry this took so long. Please update `test/libcxx/double_include.sh.cpp` > and commit. Are you sure? `double_include.sh.cpp` doesn't seem to be testing any intermediate headers. Repository: rCXX

[PATCH] D47066: [clangd] Remove ignored Preamble::CanReuse call from completion

2018-05-22 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/D47066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D47195: [clang-format] Fix ObjC message arguments handling

2018-05-22 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak created this revision. Herald added subscribers: cfe-commits, klimek. Repository: rC Clang https://reviews.llvm.org/D47195 Files: lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestObjC.cpp

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

2018-05-22 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 147994. martong marked an inline comment as done. martong added a comment. - Add new test case for simple CXXRecordDecl - Add comment about ClassTemplateSpecializationDecl implicit CXXRecordDecl Repository: rC Clang https://reviews.llvm.org/D47057

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

2018-05-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:1962 TagDecl *Definition = D->getDefinition(); - if (Definition && Definition != D) { + if (!D->isImplicit() && Definition && Definition != D) { Decl *ImportedDef = Importer.Import(Definition);

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

2018-05-22 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. What does "imm" mean anyways? Repository: rC Clang https://reviews.llvm.org/D47182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r332976 - [clangd] Remove ignored Preamble::CanReuse call from completion

2018-05-22 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Tue May 22 06:10:09 2018 New Revision: 332976 URL: http://llvm.org/viewvc/llvm-project?rev=332976=rev Log: [clangd] Remove ignored Preamble::CanReuse call from completion Summary: Now that the clients who relied on stats for files from preamble are gone. Reviewers:

[PATCH] D47066: [clangd] Remove ignored Preamble::CanReuse call from completion

2018-05-22 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332976: [clangd] Remove ignored Preamble::CanReuse call from completion (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D46926: [Fixed Point Arithmetic] Conversion between Fixed Point and Floating Point Numbers

2018-05-22 Thread Steve Canon via Phabricator via cfe-commits
scanon requested changes to this revision. scanon added a comment. This revision now requires changes to proceed. IIRC the optimization of divide-by-power-of-two --> multiply-by-inverse does not occur at -O0, so it would be better to multiply by 2^(-fbits) instead. Repository: rC Clang

[PATCH] D47200: [Sema] Add tests for weak functions

2018-05-22 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/D47200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r332991 - Revert r332982 Call CreateTempMemWithoutCast for ActiveFlag

2018-05-22 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue May 22 09:13:07 2018 New Revision: 332991 URL: http://llvm.org/viewvc/llvm-project?rev=332991=rev Log: Revert r332982 Call CreateTempMemWithoutCast for ActiveFlag Due to regression on arm. Modified: cfe/trunk/lib/CodeGen/CGCall.cpp

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

2018-05-22 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. This revision is now accepted and ready to land. LGTM with a nit. Comment at: lib/AST/ASTImporter.cpp:1962 TagDecl *Definition = D->getDefinition(); - if (Definition && Definition != D) { + if (!D->isImplicit()

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

2018-05-22 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak created this revision. Herald added subscribers: cfe-commits, klimek. Repository: rC Clang https://reviews.llvm.org/D47205 Files: lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestObjC.cpp

[PATCH] D47195: [clang-format] Fix ObjC message arguments handling

2018-05-22 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: > > > What's the receiver's

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

2018-05-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 148025. Repository: rC Clang https://reviews.llvm.org/D46084 Files: include/clang-c/Index.h include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/Basic/DiagnosticCommonKinds.td include/clang/Basic/Specifiers.h

[PATCH] D47202: [CodeGen] use nsw negation for abs

2018-05-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. That is what happens for "hand-rolled" `abs`, https://godbolt.org/g/6dbgXD I *think* this makes sense, since **IIRC** LLVM only supports twos-complement platforms. But all these attributes are currently beyond me, so i won't click the accept button :)

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

2018-05-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked 2 inline comments as done. leonardchan added inline comments. Comment at: lib/Index/USRGeneration.cpp:731 + + if (c == '~') { +switch (BT->getKind()) { jakehehrlich wrote: > You can make the 'c' a Twine instead. That will let you

r332998 - Revert "[clang-format] Fix putting ObjC message arguments in one line for multiline receiver"

2018-05-22 Thread Jacek Olesiak via cfe-commits
Author: jolesiak Date: Tue May 22 09:44:42 2018 New Revision: 332998 URL: http://llvm.org/viewvc/llvm-project?rev=332998=rev Log: Revert "[clang-format] Fix putting ObjC message arguments in one line for multiline receiver" Summary: Reverts D46879 Reviewers: benhamilton Reviewed By:

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

2018-05-22 Thread Anastasis via Phabricator via cfe-commits
gramanas updated this revision to Diff 148034. gramanas added a comment. Move ApplyDebugLocation before CreateMemTemp Repository: rC Clang https://reviews.llvm.org/D47097 Files: lib/CodeGen/CGDecl.cpp test/CodeGen/debug-info-preserve-scope.c Index:

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

2018-05-22 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: test/CodeGen/debug-info-preserve-scope.c:10 + +// CHECK: alloca i32 {{.*}} !dbg ![[dbgLocForStore:[0-9]+]] +// CHECK: store i32 {{.*}} !dbg ![[dbgLocForStore:[0-9]+]] In these two check lines, you're capturing the variable

[PATCH] D47195: [clang-format] Fix ObjC message arguments handling

2018-05-22 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak updated this revision to Diff 148038. jolesiak added a comment. Rebase. 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 ObjC message arguments handling

2018-05-22 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. Can you update the diff description to reflect that it includes the original change? Repository: rC Clang https://reviews.llvm.org/D47195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D47195: [clang-format] Fix ObjC message arguments handling

2018-05-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir 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" jolesiak wrote: > krasimir wrote: > > What's the receiver's scope in this comment

[PATCH] D47161: update

2018-05-22 Thread Anastasis via Phabricator via cfe-commits
gramanas abandoned this revision. gramanas added a comment. Duplicate of https://reviews.llvm.org/D47097 Repository: rC Clang https://reviews.llvm.org/D47161 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D47065: [clangd] Enable parsing of non-doxygen comments in global-symbol-builder

2018-05-22 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/D47065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D47099: Call CreateTempAllocaWithoutCast for ActiveFlag

2018-05-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. I revert it since it caused regression on arm and some other arch's. Script: -- /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/stage1/bin/clang -cc1 -internal-isystem

[libcxx] r332996 - Change the names of two private methods: allocate -> __vallocate and deallocate -> __vdeallocate. NFC. This change triggered by https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61806, w

2018-05-22 Thread Marshall Clow via cfe-commits
Author: marshall Date: Tue May 22 09:20:28 2018 New Revision: 332996 URL: http://llvm.org/viewvc/llvm-project?rev=332996=rev Log: Change the names of two private methods: allocate -> __vallocate and deallocate -> __vdeallocate. NFC. This change triggered by

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

2018-05-22 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rC Clang https://reviews.llvm.org/D46950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D47202: [CodeGen] use nsw negation for abs

2018-05-22 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. In https://reviews.llvm.org/D47202#1108016, @lebedev.ri wrote: > That is what happens for "hand-rolled" `abs`, https://godbolt.org/g/6dbgXD > I *think* this makes sense, since **IIRC** LLVM only supports > twos-complement platforms. > But all these attributes are

[PATCH] D47058: [ASTImporter] Fix ClassTemplateSpecialization in wrong DC

2018-05-22 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Gabor, Could you add a test for TSK_Undeclared as well? Repository: rC Clang https://reviews.llvm.org/D47058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2018-05-22 Thread Jacek Olesiak via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332998: Revert [clang-format] Fix putting ObjC message arguments in one line for… (authored by jolesiak, committed by ). Changed prior to commit: https://reviews.llvm.org/D47205?vs=148030=148032#toc

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

2018-05-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. 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? The problem we've had over and over with devirtualization is that we

[libcxx] r333050 - Implement deduction guides for basic_regex

2018-05-22 Thread Marshall Clow via cfe-commits
Author: marshall Date: Tue May 22 18:57:02 2018 New Revision: 333050 URL: http://llvm.org/viewvc/llvm-project?rev=333050=rev Log: Implement deduction guides for basic_regex Added: libcxx/trunk/test/std/re/re.regex/re.regex.construct/deduct.fail.cpp

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

2018-05-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. There are at least three good reasons to make sure this can enabled/disabled by a flag: - We have to anticipate that introducing new keywords will cause some compatibility problems. New language standards that introduce new keywords can be disabled using `-std=`.

[PATCH] D47166: use zeroinitializer for (trailing zero portion of) large array initializers more reliably

2018-05-22 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC333044: Use zeroinitializer for (trailing zero portion of) large array initializers (authored by rsmith, committed by ). Repository: rC Clang https://reviews.llvm.org/D47166 Files:

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

2018-05-22 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added subscribers: echristo, dblaikie, rjmccall. rsmith 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">; Diagnostics should

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

2018-05-22 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. This is on by default for any version of C? AFAICK `_Accum` isn't on the C17 draft that I have, I'd expect to have to specify a command-line flag pertaining to TR 18037 to get this. At a minimum I'd be OK having it with the GNU variant of C, but not the `__ANSI_C__` one.

[PATCH] D47007: [analyzer] CStringChecker fix for strlcpy when no bytes are copied to the dest buffer

2018-05-22 Thread David CARLIER via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC333060: [analyzer] CStringChecker fix for strlcpy when no bytes are copied to the dest… (authored by devnexen, committed by ). Repository: rC Clang https://reviews.llvm.org/D47007 Files:

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-05-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D45015#1105314, @rsmith wrote: > Hmm, perhaps our strategy for handling aligned allocation on Darwin should be > revisited. We shouldn't be defining `__cpp_aligned_allocation` if we believe > it doesn't work -- that will break code that

[PATCH] D47233: [CodeGen] Emit MSVC RTTI for Obj-C EH types

2018-05-22 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai updated this revision to Diff 148133. smeenai added a comment. Colocate CHECK lines with declarations Repository: rC Clang https://reviews.llvm.org/D47233 Files: lib/CodeGen/CGCXXABI.h lib/CodeGen/CGObjCMac.cpp lib/CodeGen/MicrosoftCXXABI.cpp test/CodeGenObjC/dllstorage.m

[PATCH] D47103: Implement strip.invariant.group

2018-05-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. The changes to Clang generally seem reasonable, but I think you should split them into a separate commit from the commit that adds the intrinsic itself. Comment at: clang/lib/CodeGen/CGExpr.cpp:3858 +} + } + Please add a comment

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

2018-05-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue May 22 17:09:29 2018 New Revision: 333044 URL: http://llvm.org/viewvc/llvm-project?rev=333044=rev Log: Use zeroinitializer for (trailing zero portion of) large array initializers more reliably. Clang has two different ways it emits array constants (from InitListExprs and

r333046 - [AST][ObjC] Print implicit property expression that only has a setter without crashing

2018-05-22 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue May 22 17:52:20 2018 New Revision: 333046 URL: http://llvm.org/viewvc/llvm-project?rev=333046=rev Log: [AST][ObjC] Print implicit property expression that only has a setter without crashing rdar://40447209 Modified: cfe/trunk/include/clang/Basic/IdentifierTable.h

[libcxx] r333058 - Mark more bits of P0433 as complete.

2018-05-22 Thread Marshall Clow via cfe-commits
Author: marshall Date: Tue May 22 20:22:59 2018 New Revision: 333058 URL: http://llvm.org/viewvc/llvm-project?rev=333058=rev Log: Mark more bits of P0433 as complete. Modified: libcxx/trunk/www/cxx1z_status.html Modified: libcxx/trunk/www/cxx1z_status.html URL:

[PATCH] D47067: Update NRVO logic to support early return

2018-05-22 Thread Taiju Tsuiki via Phabricator via cfe-commits
tzik added inline comments. Comment at: lib/Sema/SemaDecl.cpp:12760 // to deduce an implicit return type. - if (FD->getReturnType()->isRecordType() && - (!getLangOpts().CPlusPlus || !FD->isDependentContext())) + if (!FD->getReturnType()->isScalarType())

[PATCH] D45898: [SemaCXX] Mark destructor as referenced

2018-05-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D45898#1104025, @rsmith wrote: > As it happens, the C++ committee fixed the language wording hole here very > recently. The new rule can be found here: http://wg21.link/p0968r0#2227 > In summary: we should to consider the destructor for all

r333062 - [X86] In the floating point max reduction intrinsics, negate infinity before feeding it to set1.

2018-05-22 Thread Craig Topper via cfe-commits
Author: ctopper Date: Tue May 22 22:51:52 2018 New Revision: 333062 URL: http://llvm.org/viewvc/llvm-project?rev=333062=rev Log: [X86] In the floating point max reduction intrinsics, negate infinity before feeding it to set1. Previously we negated the whole vector after splatting infinity. But

[PATCH] D47175: [DOXYGEN] Formatting changes for better intrinsics documentation rendering

2018-05-22 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. LGTM Repository: rC Clang https://reviews.llvm.org/D47175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >