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

2018-04-26 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: include/clang/Sema/CodeCompleteConsumer.h:704 +CXAvailabilityKind Availability, +const std::vector &Corrections) : Allocator(Allocator), CCTUInfo(CCTUInfo), Priority(Priority), ---

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

2018-04-26 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 144285. yvvan marked 4 inline comments as done. yvvan added a comment. Minor clean-up according to the last comments https://reviews.llvm.org/D41537 Files: include/clang-c/Index.h include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/CodeComplet

[PATCH] D45045: [DebugInfo] Generate debug information for labels.

2018-04-26 Thread Hsiangkai Wang via Phabricator via cfe-commits
HsiangKai marked an inline comment as done. HsiangKai added a comment. @chenwj Do you have any comments for this patch? Repository: rC Clang https://reviews.llvm.org/D45045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

r331019 - Revert "[CodeGen] Avoid destructing a callee-destructued struct type in a"

2018-04-26 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Apr 26 22:56:55 2018 New Revision: 331019 URL: http://llvm.org/viewvc/llvm-project?rev=331019&view=rev Log: Revert "[CodeGen] Avoid destructing a callee-destructued struct type in a" This reverts commit r331016, which broke a windows bot. http://lab.llvm.org:8011/build

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2018-04-26 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc updated this revision to Diff 144280. russellmcc marked an inline comment as done. russellmcc added a comment. Further update doc comments, render rst file https://reviews.llvm.org/D40988 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/Continuat

r331017 - Fix typo.

2018-04-26 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 26 21:27:26 2018 New Revision: 331017 URL: http://llvm.org/viewvc/llvm-project?rev=331017&view=rev Log: Fix typo. Modified: cfe/trunk/include/clang/Basic/SourceManager.h Modified: cfe/trunk/include/clang/Basic/SourceManager.h URL: http://llvm.org/viewvc/llvm-pro

[PATCH] D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor

2018-04-26 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331016: [CodeGen] Avoid destructing a callee-destructued struct type in a (authored by ahatanak, committed by ). Repository: rC Clang https://reviews.llvm.org/D45382 Files: lib/CodeGen/CGCall.cpp

r331016 - [CodeGen] Avoid destructing a callee-destructued struct type in a

2018-04-26 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Apr 26 21:21:51 2018 New Revision: 331016 URL: http://llvm.org/viewvc/llvm-project?rev=331016&view=rev Log: [CodeGen] Avoid destructing a callee-destructued struct type in a function if a function delegates to another function. Fix a bug introduced in r328731, which cau

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2018-04-26 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc updated this revision to Diff 144269. russellmcc added a comment. Responded to review feedback. Improved documentation comments for new options. While adding tests for the other constructor line break styles, I noticed an inconsistency with the way "after colon" behaved with `Constr

[PATCH] D46146: [analyzer] pr37152: Fix operator delete[] array-type-sub-expression handling.

2018-04-26 Thread Phabricator 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 rL331014: [analyzer] Fix operator delete[] array-type-sub-expression handling. (authored by dergachev, committed by ). Heral

r331014 - [analyzer] Fix operator delete[] array-type-sub-expression handling.

2018-04-26 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Apr 26 19:16:03 2018 New Revision: 331014 URL: http://llvm.org/viewvc/llvm-project?rev=331014&view=rev Log: [analyzer] Fix operator delete[] array-type-sub-expression handling. Avoid crash when the sub-expression of operator delete[] is of array type. This is not the

r331013 - Parse A::template B as an identifier rather than as a template-id with no

2018-04-26 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 26 19:00:13 2018 New Revision: 331013 URL: http://llvm.org/viewvc/llvm-project?rev=331013&view=rev Log: Parse A::template B as an identifier rather than as a template-id with no template arguments. This fixes some cases where we'd incorrectly accept "A::template B" wh

r331010 - [Driver] Don't enable "-fregister-global-dtors-with-atexit" by default

2018-04-26 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Apr 26 18:42:33 2018 New Revision: 331010 URL: http://llvm.org/viewvc/llvm-project?rev=331010&view=rev Log: [Driver] Don't enable "-fregister-global-dtors-with-atexit" by default when compiling the kernel or kexts. Destructors should be registered with atexit by default

[PATCH] D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor

2018-04-26 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks, LGTM. Repository: rC Clang https://reviews.llvm.org/D45382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

[PATCH] D46165: [Modules] Handle ObjC/C ODR-like semantics for EnumConstantDecl

2018-04-26 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added a reviewer: rsmith. Herald added a subscriber: jkorous. Support for ObjC/C ODR-like semantics with structural equivalence checking was added back in r306918. There enums are handled and also checked for structural equivalence. However, at use time of Enum

[PATCH] D45814: Fix an assertion when -print-prog-name=

2018-04-26 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I'm torn on this. The other `-print` options will perform the validation implicitly at the higher level before calling the inner functions. It is certainly reasonable to support that, but, for the common path, this check seems unnecessary (and this function is used e

[PATCH] D46109: [ARM, AArch64] Add intrinsics for dot product instructions

2018-04-26 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: test/CodeGen/arm-neon-dot-product.c:1 +// RUN: %clang_cc1 -triple armv8-linux-gnueabihf -target-cpu cortex-a57 -target-feature +dotprod \ +// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -instcombine | FileCheck %s --

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-26 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 created this revision. pfultz2 added reviewers: aaron.ballman, hokein, ilya-biryukov. Herald added subscribers: cfe-commits, xazax.hun. The alpha checkers can already be enabled using the clang driver, this allows them to be enabled using the clang-tidy as well. This can make it easier to

[PATCH] D46155: Add warning flag -Wordered-compare-function-pointers.

2018-04-26 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added a reviewer: rsmith. The C standard doesn't allow comparisons like "f1 < f2" (where f1 and f2 are function pointers), but we allow them as an extension. Add awarning flag to control this warning. (Not sure I like the name, but this seems to des

[PATCH] D46109: [ARM, AArch64] Add intrinsics for dot product instructions

2018-04-26 Thread Junmo Park via Phabricator via cfe-commits
flyingforyou added inline comments. Comment at: test/CodeGen/arm-neon-dot-product.c:1 +// RUN: %clang_cc1 -triple armv8-linux-gnueabihf -target-cpu cortex-a57 -target-feature +dotprod \ +// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -instcombine | FileCheck %s --

[PATCH] D45713: [libclang] Fix the type of 'int (Foo);'

2018-04-26 Thread strager via Phabricator via cfe-commits
strager added a comment. Ping! I'd like a code review for this bug fix. Repository: rC Clang https://reviews.llvm.org/D45713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46109: [ARM, AArch64] Add intrinsics for dot product instructions

2018-04-26 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: test/CodeGen/arm-neon-dot-product.c:1 +// RUN: %clang_cc1 -triple armv8-linux-gnueabihf -target-cpu cortex-a57 -target-feature +dotprod \ +// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -instcombine | FileCheck %s --

[PATCH] D46109: [ARM, AArch64] Add intrinsics for dot product instructions

2018-04-26 Thread Junmo Park via Phabricator via cfe-commits
flyingforyou added inline comments. Comment at: test/CodeGen/arm-neon-dot-product.c:1 +// RUN: %clang_cc1 -triple armv8-linux-gnueabihf -target-cpu cortex-a57 -target-feature +dotprod \ +// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -instcombine | FileCheck %s --

[PATCH] D46112: Allow _Atomic to be specified on incomplete types

2018-04-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaType.cpp:8022 +else if (LangOpts.CPlusPlus && isCompleteType(Loc, T) && + !T.isTriviallyCopyableType(Context)) // Some other non-trivially-copyable type (probably a C++ class) efriedma

[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

2018-04-26 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal added subscribers: STL_MSFT, BillyONeal. BillyONeal added a comment. @mclow.lists @STL_MSFT Why did tests for this this go into std? [reentrancy]/1 says this isn't required to work. Moreover, assignments in the dtor like this *can't* work in the general case because they would try to

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc accepted this revision. chandlerc added a comment. This revision is now accepted and ready to land. LGTM, thanks so much! https://reviews.llvm.org/D46135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor

2018-04-26 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 144231. ahatanak marked an inline comment as done. ahatanak added a comment. Rename variable to something OldCleanupScopeDepth. Repository: rC Clang https://reviews.llvm.org/D45382 Files: lib/CodeGen/CGCall.cpp lib/CodeGen/CGCleanup.cpp lib/CodeGe

[PATCH] D46146: [analyzer] pr37152: Fix operator delete[] array-type-sub-expression handling.

2018-04-26 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:1089-1091 +// Yes, it may even be a multi-dimensional array. +while (const auto *AT = getContext().getAsArrayType(DTy)) + DTy = AT->getElementType(); alexfh wrote: > Maybe

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Sanjay Patel via Phabricator via cfe-commits
spatel updated this revision to Diff 144226. spatel added a comment. Patch upated: 1. Restore the 'no' option to allow toggling. 2. Add a RUN to the codegen test to show that the function attribute is not appended by default. https://reviews.llvm.org/D46135 Files: docs/UsersManual.rst inc

[PATCH] D46148: [CUDA] Added -f[no-]cuda-short-ptr option

2018-04-26 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 144216. tra added a comment. Removed debug printout. https://reviews.llvm.org/D46148 Files: clang/include/clang/Driver/Options.td clang/lib/Basic/Targets/NVPTX.cpp clang/lib/Driver/ToolChains/Cuda.cpp Index: clang/lib/Driver/ToolChains/Cuda.cpp

[PATCH] D45294: [libcxx] [test] Remove non-portable assertions from filebuf tests

2018-04-26 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal closed this revision. BillyONeal added a comment. D:\msvc\src\qa\VC\Libs\libcxx\upstream>git svn dcommit Committing to https://llvm.org/svn/llvm-project/libcxx/trunk ... Use of uninitialized value $rec in scalar chomp at /mingw64/share/perl5/Git.pm line 557, <$fh> chunk 4. Authenticati

[libcxx] r330999 - [libcxx] [test] Remove non-portable assertions from filebuf tests

2018-04-26 Thread Billy Robert O'Neal III via cfe-commits
Author: bion Date: Thu Apr 26 15:18:33 2018 New Revision: 330999 URL: http://llvm.org/viewvc/llvm-project?rev=330999&view=rev Log: [libcxx] [test] Remove non-portable assertions from filebuf tests seekoff.pass.cpp: libc++'s tests are asserting things about the buffer passed to pubsetbuf. [filebu

[PATCH] D46148: [CUDA] Added -f[no-]cuda-short-ptr option

2018-04-26 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added a reviewer: jlebar. Herald added subscribers: bixia, sanjoy, jholewinski. The option enables use of 32-bit pointers for accessing const/local/shared memory. The feature is disabled by default. https://reviews.llvm.org/D46148 Files: clang/include/clang/Driv

[PATCH] D46146: [analyzer] pr37152: Fix operator delete[] array-type-sub-expression handling.

2018-04-26 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:1089-1091 +// Yes, it may even be a multi-dimensional array. +while (const auto *AT = getContext().getAsArrayType(DTy)) + DTy = AT->getElementType(); Maybe add a FIXME t

[PATCH] D46146: [analyzer] pr37152: Fix operator delete[] array-type-sub-expression handling.

2018-04-26 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs, baloghadamsoftware. When operator `delete[]` receives a sub-expression of array type, it destroys the array correctly. Even if it's multi-dim

[PATCH] D46115: [ASTImporter] properly import SrcLoc of Attr

2018-04-26 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a reviewer: a.sidorin. NoQ added a comment. +Alexey because he's the `ASTImporter` guy. Repository: rC Clang https://reviews.llvm.org/D46115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added a comment. In https://reviews.llvm.org/D46135#1080108, @spatel wrote: > 3. Remove the 'no' version of the flag. Given the change in the default, this > seems more natural to me, and it simplifies the patch/tests...but I might > have been too pessimistic before and this is too op

r330997 - [x86] Revert r330322 (& r330323): Lowering x86 adds/addus/subs/subus intrinsics

2018-04-26 Thread Chandler Carruth via cfe-commits
Author: chandlerc Date: Thu Apr 26 14:46:01 2018 New Revision: 330997 URL: http://llvm.org/viewvc/llvm-project?rev=330997&view=rev Log: [x86] Revert r330322 (& r330323): Lowering x86 adds/addus/subs/subus intrinsics The LLVM commit introduces a crash in LLVM's instruction selection. I filed http

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Sanjay Patel via Phabricator via cfe-commits
spatel updated this revision to Diff 144200. spatel added a comment. Patch updated: 1. Improve the documentation language - more suggestions welcome! 2. Change the default setting so the work-around is 'off' (ie, by default assume source is compliant and optimize accordingly). 3. Remove the 'no'

[PATCH] D46081: [analyzer] Expand conversion check to check more expressions for overflow and underflow

2018-04-26 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 updated this revision to Diff 144202. pfultz2 added a comment. So I ran this on clang/llvm code base and fixed some false positives. https://reviews.llvm.org/D46081 Files: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp test/Analysis/conversion.c test/Analysis/conversion.cpp In

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Steve Canon via Phabricator via cfe-commits
scanon added a comment. I like Chandler's wording. Something like: "... this flag will attempt to cause " https://reviews.llvm.org/D46135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added inline comments. Comment at: docs/UsersManual.rst:1260-1265 + Enable or disable a code generation optimization that may convert a + cast of a floating-point value to integer and back to floating-point + into the equivalent of the math libary's 'trunc()' func

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-26 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/AST/Expr.cpp:870 + if (C.getLangOpts().OpenCL && Ty.getAddressSpace() == LangAS::Default) +Ty = C.getAddrSpaceQualType(Ty, LangAS::opencl_constant); + As `Ty` is passed by value, shouldn't we accept only data loca

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added inline comments. Comment at: docs/UsersManual.rst:1260-1265 + Enable or disable a code generation optimization that may convert a + cast of a floating-point value to integer and back to floating-point + into the equivalent of the math libary's 'trunc()' functio

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added inline comments. Comment at: docs/UsersManual.rst:1260-1265 + Enable or disable a code generation optimization that may convert a + cast of a floating-point value to integer and back to floating-point + into the equivalent of the math libary's 'trunc()' func

[PATCH] D46139: Add template type and value parameter metadata nodes to template variable specializations.

2018-04-26 Thread Matthew Voss via Phabricator via cfe-commits
ormris abandoned this revision. ormris added a comment. After some further inspection, support for the LLVM side of patch needs a few significant additions. Abandoning this revision. Repository: rC Clang https://reviews.llvm.org/D46139 ___ cfe-c

[PATCH] D46132: [X86] Make __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32 only available on 32-bit targets.

2018-04-26 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330987: [X86] Make __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32… (authored by ctopper, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.l

r330987 - [X86] Make __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32 only available on 32-bit targets.

2018-04-26 Thread Craig Topper via cfe-commits
Author: ctopper Date: Thu Apr 26 13:14:46 2018 New Revision: 330987 URL: http://llvm.org/viewvc/llvm-project?rev=330987&view=rev Log: [X86] Make __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32 only available on 32-bit targets. These builtins can't be handled by the backend on 64

[PATCH] D46143: [clang-format/ObjC] Use getIdentifierInfo() instead of tok::identifier

2018-04-26 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: djasper, jolesiak. Herald added subscribers: cfe-commits, klimek. Previously, we checked tokens for `tok::identifier` to see if they were identifiers inside an Objective-C selector. However, this missed C++ keywords like `new` and `d

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Jorge Gorbe via Phabricator via cfe-commits
jgorbe added a comment. Can't comment much on the patch itself (I'm still not very familiar with the codebase, I'll leave that to the other reviewers), but thanks a lot for responding so quickly! :) https://reviews.llvm.org/D46135 ___ cfe-commits

[PATCH] D46132: [X86] Make __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32 only available on 32-bit targets.

2018-04-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Looks good. Repository: rC Clang https://reviews.llvm.org/D46132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D46112: Allow _Atomic to be specified on incomplete types

2018-04-26 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. This generally makes sense. Need some tests to make sure we emit an appropriate error if you try to actually use atomic operators (load/store) or intrinsics (__atomic_is_lock_free etc.) with an incomplete type. And a test that code generation emits something appropri

[PATCH] D46139: Add template type and value parameter metadata nodes to template variable specializations.

2018-04-26 Thread Matthew Voss via Phabricator via cfe-commits
ormris added a comment. Thanks for spotting that @probinson. Will update. Repository: rC Clang https://reviews.llvm.org/D46139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46139: Add template type and value parameter metadata nodes to template variable specializations.

2018-04-26 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:3023 + templateParameters = parameterNodes.get(); + // Since we emit declarations (DW_AT_members) for static members, place the Naively it looks like it should be possible to put the loc

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added inline comments. Comment at: test/CodeGen/no-junk-ftrunc.c:1 +// RUN: %clang_cc1 -S -ffp-cast-overflow-workaround %s -emit-llvm -o - | FileCheck %s + lebedev.ri wrote: > For a good measure, i'd add one more `RUN` line to test that it is currently >

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExpr.cpp:3059 /*IndexTypeQuals*/ 0); SL = StringLiteral::Create(Context, Str, StringLiteral::Ascii, /*Pascal*/ false, ResTy, Loc); --

[PATCH] D46139: Add template type and value parameter metadata nodes to template variable specializations.

2018-04-26 Thread Matthew Voss via Phabricator via cfe-commits
ormris created this revision. ormris added reviewers: dblaikie, probinson, aprantl, JDevlieghere, clayborg. Depends on LLVM patch: https://reviews.llvm.org/D46138 Resolves PR22119 Repository: rC Clang https://reviews.llvm.org/D46139 Files: lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGDebug

[PATCH] D45884: [Sema] Fix parsing of anonymous union in language linkage specification

2018-04-26 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai accepted this revision. vsapsai added inline comments. This revision is now accepted and ready to land. Comment at: Sema/SemaDecl.cpp:4651-4653 + + DeclContext *OwnerScope = Owner->getRedeclContext(); + I think the code style favours avoiding excessi

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/CodeGen/no-junk-ftrunc.c:1 +// RUN: %clang_cc1 -S -ffp-cast-overflow-workaround %s -emit-llvm -o - | FileCheck %s + For a good measure, i'd add one more `RUN` line to test that it is currently the default. (Yes

[PATCH] D45917: Pass -Oz/-Os along to the backend

2018-04-26 Thread Jessica Paquette via Phabricator via cfe-commits
paquette abandoned this revision. paquette added a comment. We decided it'd be better to just use function attributes for the outliner, so I'm abandoning this. https://reviews.llvm.org/D45917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Parse/ParseStmtAsm.cpp:696 +return StmtError(); + } + svenvh wrote: > rjmccall wrote: > > svenvh wrote: > > > rjmccall wrote: > > > > You might consider parsing the statement normally and then just > > > > dia

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-26 Thread Sanjay Patel via Phabricator via cfe-commits
spatel created this revision. spatel added reviewers: jgorbe, chandlerc, scanon, hans, echristo. Herald added a subscriber: mcrosier. As discussed in the post-commit thread for: https://reviews.llvm.org/rL330437 ( http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20180423/545906.html ) We

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-26 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added inline comments. This revision is now accepted and ready to land. Comment at: lib/Sema/SemaExpr.cpp:3056 + if (LangOpts.OpenCL) +ResTy = Context.getAddrSpaceQualType(ResTy, LangAS::opencl_constant); ResTy = Context.get

[PATCH] D46131: Add Microsoft Mangling for OpenCL Half Type

2018-04-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D46131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 144154. Anastasia added a comment. - Renamed test; - Reformatted; - Added constant in StringLiteral creation. https://reviews.llvm.org/D46049 Files: lib/AST/Expr.cpp lib/Sema/SemaExpr.cpp test/SemaOpenCL/predefined-expr.cl Index: test/SemaOpenCL/p

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: lib/Parse/ParseStmtAsm.cpp:696 +return StmtError(); + } + rjmccall wrote: > svenvh wrote: > > rjmccall wrote: > > > You might consider parsing the statement normally and then just > > > diagnosing after the fact, ma

[PATCH] D46024: [clang-format] Add SpaceBeforeCpp11BracedList option.

2018-04-26 Thread Ross Kirsling via Phabricator via cfe-commits
rkirsling added a comment. In https://reviews.llvm.org/D46024#1079390, @klimek wrote: > Is this written down somewhere? https://webkit.org/code-style-guidelines/ > doesn't seem to mention it. I agree that it really ought to be mentioned there—I'll try to bring that up with the original author

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Parse/ParseStmtAsm.cpp:696 +return StmtError(); + } + svenvh wrote: > rjmccall wrote: > > You might consider parsing the statement normally and then just diagnosing > > after the fact, maybe in Sema. You'd ha

[PATCH] D46132: [X86] Make __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32 only available on 32-bit targets.

2018-04-26 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: rnk, echristo, chandlerc. These builtins can't be handled by the backend on 64-bit targets. So error up front instead of throwing an isel error. Fixes PR37225 Repository: rC Clang https://reviews.llvm.org/D46132 Files: inc

[PATCH] D46131: Add Microsoft Mangling for OpenCL Half Type

2018-04-26 Thread Vince Bridgers via Phabricator via cfe-commits
vbridgers created this revision. vbridgers added reviewers: rnk, Anastasia, erichkeane. vbridgers added a project: clang. Herald added subscribers: cfe-commits, yaxunl. Half-type mangling is accomplished following the method introduced by Erich Keane for mangling _Float16. Updated the half.cl LIT

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 144138. svenvh added a comment. Reject goto in `Sema::ActOnIndirectGotoStmt` too, and add a test for indirect goto. https://reviews.llvm.org/D46022 Files: include/clang/Basic/DiagnosticCommonKinds.td include/clang/Basic/DiagnosticParseKinds.td include

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: lib/Parse/ParseStmtAsm.cpp:696 +return StmtError(); + } + rjmccall wrote: > You might consider parsing the statement normally and then just diagnosing > after the fact, maybe in Sema. You'd have to add the check in

[libcxx] r330955 - Move old test into test/libcxx, and implement new version of test for ostreambuf_iterator::failed. Fixes PR#37245. Thanks to Billy O'Neill for the bug report.

2018-04-26 Thread Marshall Clow via cfe-commits
Author: marshall Date: Thu Apr 26 09:16:45 2018 New Revision: 330955 URL: http://llvm.org/viewvc/llvm-project?rev=330955&view=rev Log: Move old test into test/libcxx, and implement new version of test for ostreambuf_iterator::failed. Fixes PR#37245. Thanks to Billy O'Neill for the bug report. A

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-26 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya abandoned this revision. hiraditya added a comment. It appears this warning may not be always useful because there will be false positives. https://reviews.llvm.org/D45601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

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

2018-04-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGObjCGNU.cpp:961 + GV->setSection(Section); +return GV; + } I'd encourage you to use ConstantBuilder whenever you would want to use this. Comment at: lib/CodeGen/CGObjCGNU.cpp:9

[PATCH] D46081: [analyzer] Expand conversion check to check more expressions for overflow and underflow

2018-04-26 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. So moving to core will require explicit casts in some of the tests, especially for things like: `memcpy(a262.s1, input, -1)`. Or this could be moved to another section instead of core. In https://reviews.llvm.org/D45532 there is talk of adding a bugprone section. I thin

[PATCH] D45720: [X86] Lowering PACK*S (pack with saturation) intrinsics to native IR (clang side)

2018-04-26 Thread Mikhail Dvoretckii via Phabricator via cfe-commits
mike.dvoretsky updated this revision to Diff 144126. mike.dvoretsky added a comment. Changed the shuffle mask emission code to match https://reviews.llvm.org/D45721. https://reviews.llvm.org/D45720 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/avx2-builtins.c clang/test/CodeGe

Re: [PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-04-26 Thread Mikhail Ramalho via cfe-commits
Hi, > Or is the that whenever there's a `#line` directive we get into a > "virtual" file that's not registered in the `SourceManager`? > > The virtual file is actually registered in the SourceManager but the FileEntry for it is NULL (USRGeneration.cpp:33), which forces printLoc to return true (US

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2018-04-26 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I didn't see an answer to the inline assembly question. Comment at: lib/Headers/pconfigintrin.h:31 + +#define MKTME_KEY_PROGRAM 0x0001 + craig.topper wrote: > This doesn't match the name used by gcc. It also needs to start with

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Basic/TokenKinds.def:255 +// KEYNOOPENCL - This is a keyword that is not supported in OpenCL C +// nor in OpenCL C++. // KEYALTIVEC - This is a keyword in AltiVec svenvh wrote: > rjm

[PATCH] D45921: Add getDeserializationListener to ASTReader

2018-04-26 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330946: Add getDeserializationListener to ASTReader (authored by yamaguchi, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D45921?vs=143441&id

r330946 - Add getDeserializationListener to ASTReader

2018-04-26 Thread Yuka Takahashi via cfe-commits
Author: yamaguchi Date: Thu Apr 26 08:09:13 2018 New Revision: 330946 URL: http://llvm.org/viewvc/llvm-project?rev=330946&view=rev Log: Add getDeserializationListener to ASTReader Summary: We need to know if ASTReader already has a DeserializationListner or not, and this also helps to create a mu

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-04-26 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 3 inline comments as done. Szelethus added a comment. By the way, thank you all for taking the time to review my code! Comment at: lib/StaticAnalyzer/Checkers/CtorUninitializedMemberChecker.cpp:306 + + const RecordDecl *RD = + R->getValueType()->getAs()->

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-04-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added subscribers: sammccall, ioeric, hokein, bkramer. ilya-biryukov added a comment. In https://reviews.llvm.org/D42966#1079438, @mikhail.ramalho wrote: > The virtual file is actually registered in the SourceManager but the > FileEntry for it is NULL (USRGeneration.cpp:33), which

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-04-26 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 144119. Szelethus added a comment. Fixes according to inline comments. https://reviews.llvm.org/D45532 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/CtorUninitializedM

[PATCH] D46081: [analyzer] Expand conversion check to check more expressions for overflow and underflow

2018-04-26 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > Have you tried on any large codebases? This check is not available to the user yet. I can move it to core if you want. Repository: rC Clang https://reviews.llvm.org/D46081 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D46019: [ASTImporter] Fix isa cast assert

2018-04-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Guys, I still don't have commit rights, could you please help me with the commit? (I think one more good quality patch and then I could request commit rights for myself ...) Repository: rC Clang https://reviews.llvm.org/D46019

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-04-26 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a subscriber: rsmith. mikhail.ramalho added a comment. Hi, > Or is the that whenever there's a `#line` directive we get into a > "virtual" file that's not registered in the `SourceManager`? The virtual file is actually registered in the SourceManager but the FileEntry for

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2018-04-26 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 144113. https://reviews.llvm.org/D44387 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/CodeGen/CGBuiltin.cpp lib/Headers/CMakeLists.txt lib/Headers/cpuid.h lib/H

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2018-04-26 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 144112. https://reviews.llvm.org/D44387 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/CodeGen/CGBuiltin.cpp lib/Headers/CMakeLists.txt lib/Headers/cpuid.h lib/H

[PATCH] D32860: [Analyzer] Iterator Checker - Part 6: Mismatched iterator checker for constructors and comparisons

2018-04-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 144110. baloghadamsoftware added a comment. Herald added a reviewer: george.karpenkov. Rebased to Part 5. https://reviews.llvm.org/D32860 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Analysis/mismatched-iterator.cpp Index: tes

[PATCH] D46081: [analyzer] Expand conversion check to check more expressions for overflow and underflow

2018-04-26 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added inline comments. Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:77 if (Opc == BO_Assign) { - LossOfSign = isLossOfSign(Cast, C); - LossOfPrecision = isLossOfPrecision(Cast, Cast->getType(), C); + if (!B->getRHS()->isIntegerConstant

[PATCH] D46081: [analyzer] Expand conversion check to check more expressions for overflow and underflow

2018-04-26 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > While I understand extending the analyzer to cover more is a good approach, > there is -Wconversion which seemingly covers this -- or at least the trivial > case(?): Yes, but it won't catch something like this, which is more interesting: void g(unsigned); void f(

[PATCH] D46000: [AST] Added a helper to extract a user-friendly text of a comment.

2018-04-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Looks good. We still need tests though :) Comment at: lib/AST/RawCommentList.cpp:376 +SourceMgr.getSpellingColumnNumber(Tok.getLocation(), &LocInvalid); +if (LocInvalid) + TokColumn = 0; This is a bit confusing... Could

[PATCH] D32859: [Analyzer] Iterator Checker - Part 5: Move Assignment of Containers

2018-04-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 144106. baloghadamsoftware added a comment. Herald added a reviewer: george.karpenkov. One test failed after rebased to the current master branch. Depending on the internal implementation of the iterator and the move operation of the container it

[PATCH] D44684: [mips] Improve handling of -fno-[pic/PIC] option

2018-04-26 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added inline comments. Comment at: include/clang/Basic/DiagnosticDriverKinds.td:340 + "ignoring '%0' option as it cannot be used with " + "explicit use of -mabicalls and the N64 ABI">, InGroup; Use the %select{optionA|optionB|..|optionZ}$NUM operator

[PATCH] D46024: [clang-format] Add SpaceBeforeCpp11BracedList option.

2018-04-26 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Is this written down somewhere? https://webkit.org/code-style-guidelines/ doesn't seem to mention it. Repository: rC Clang https://reviews.llvm.org/D46024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-04-26 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: include/clang/Format/Format.h:891 + /// \endcode + bool BreakBeforeLambdaBody; + I'd just make that default for Allman style. Comment at: lib/Format/TokenAnnotator.cpp:2844 if (isAllmanBrace(Left)

[PATCH] D38845: [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, DependentScopeDeclRefExpr

2018-04-26 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin requested changes to this revision. a.sidorin added inline comments. This revision now requires changes to proceed. Comment at: unittests/AST/ASTImporterTest.cpp:1569 +FirstDeclMatcher().match(*TB, Pattern); +if (!FromDSDRE) + return; s

[PATCH] D46115: [ASTImporter] properly import SrcLoc of Attr

2018-04-26 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added a comment. This is unfinished. Posting to make you aware of the issue. There are other occurances of imported attrs without importing the srcloc in: - VisitIndirectFieldDecl - VisitAttributedStmt So I was thinking this would suggest to add a public API `ASTImporter::Import(Attr *

  1   2   >