[PATCH] D25125: [CUDA] Disallow 'extern __shared__' variables.

2016-09-30 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rnk. jlebar added subscribers: tra, cfe-commits. https://reviews.llvm.org/D25125 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclAttr.cpp clang/test/SemaCUDA/extern-shared.cu Index: clang/test/SemaCUDA/e

[PATCH] D25125: [CUDA] Disallow 'extern __shared__' variables.

2016-09-30 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 73136. jlebar added a comment. Fix typo (and add a test to catch it). https://reviews.llvm.org/D25125 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclAttr.cpp clang/test/SemaCUDA/bad-attributes.cu clang/test/SemaCUDA/ex

[PATCH] D25125: [CUDA] Disallow 'extern __shared__' variables.

2016-09-30 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a reviewer: tra. tra added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D25125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

r282948 - [sancov] -symbolize documentation update

2016-09-30 Thread Mike Aizatsky via cfe-commits
Author: aizatsky Date: Fri Sep 30 16:02:56 2016 New Revision: 282948 URL: http://llvm.org/viewvc/llvm-project?rev=282948&view=rev Log: [sancov] -symbolize documentation update Modified: cfe/trunk/docs/SanitizerCoverage.rst Modified: cfe/trunk/docs/SanitizerCoverage.rst URL: http://llvm.org/

[PATCH] D25129: [CUDA] Disallow __constant__ local variables.

2016-09-30 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added reviewers: tra, rnk. jlebar added a subscriber: cfe-commits. https://reviews.llvm.org/D25129 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclAttr.cpp clang/test/SemaCUDA/bad-attributes.cu Index: clang/test/SemaCUDA/

r282949 - Add missing std::move in Replacements::add

2016-09-30 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Fri Sep 30 16:05:45 2016 New Revision: 282949 URL: http://llvm.org/viewvc/llvm-project?rev=282949&view=rev Log: Add missing std::move in Replacements::add This diff adds std::move to avoid copying of the Replacement NewR in the method Replacements::add. Test plan: make -j

[PATCH] D25049: Add missing std::move in Replacements::add

2016-09-30 Thread Alexander Shaposhnikov via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL282949: Add missing std::move in Replacements::add (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D25049?vs=72902&id=73140#toc Repository: rL LLVM https://reviews.llvm.org

[PATCH] D25130: [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts

2016-09-30 Thread Gor Nishanov via cfe-commits
GorNishanov created this revision. GorNishanov added reviewers: rsmith, rnk, EricWF, cfe-commits. Herald added a subscriber: mehdi_amini. Also makes -fcoroutines_ts to be both a Driver and CC1 flag. Patch mostly by EricWF. https://reviews.llvm.org/D25130 Files: include/clang/Basic/LangOption

Re: [PATCH] [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts

2016-09-30 Thread Gor Nishanov via cfe-commits
Uploaded to phabricator as https://reviews.llvm.org/D25130 __cpp_coroutines stays as it is. On Fri, Sep 30, 2016 at 10:11 AM, Gor Nishanov wrote: > I noticed that other TSes has experimental in their SD-6 macro name, > hence, I changed it to match the concepts TS macro > __cpp_experimental_conc

[PATCH] D23236: When ARC is enabled, no warning will be generated when a method1. Returns 'nil' in a method that is attributed to return a 'nonnull'2. The return-statement is a ConditionalOperator, wh

2016-09-30 Thread Devin Coughlin via cfe-commits
dcoughlin requested changes to this revision. dcoughlin added a comment. This revision now requires changes to proceed. Upon reflection, I don't think this is the right approach. Desugaring any AttributedType in the return type seems like a really, really big hammer and could be an unexpected su

[PATCH] D25131: Fix PR 28885: Fix AST Printer output for inheriting constructor using declarations

2016-09-30 Thread Alex Lorenz via cfe-commits
arphaman created this revision. arphaman added a reviewer: rsmith. arphaman added a subscriber: cfe-commits. arphaman set the repository for this revision to rL LLVM. This patch ensures that the AST printer outputs the correct C++ type for an inheriting constructor using declaration. For example

[PATCH] D25129: [CUDA] Disallow __constant__ local variables.

2016-09-30 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. > DiagnosticSemaKinds.td:6727 > def err_cuda_extern_shared : Error<"__shared__ variable %0 cannot be > 'extern'">; > +def err_cuda_nonglobal_constant : Error<"__constant__ variables must be

[PATCH] D25129: [CUDA] Disallow __constant__ local variables.

2016-09-30 Thread Justin Lebar via cfe-commits
jlebar added inline comments. > tra wrote in DiagnosticSemaKinds.td:6727 > Nit: Technically they are allowed in namespace scope. That's still a "global variable"? Or do you think calling it such will be confusing? https://reviews.llvm.org/D25129

[PATCH] D25129: [CUDA] Disallow __constant__ local variables.

2016-09-30 Thread Artem Belevich via cfe-commits
tra added inline comments. > jlebar wrote in DiagnosticSemaKinds.td:6727 > That's still a "global variable"? Or do you think calling it such will be > confusing? It's not clear whether you mean global storage class or global namespace. The code checks for global storage, but error message is c

r282962 - [sanitizer-coverage] fix docs

2016-09-30 Thread Kostya Serebryany via cfe-commits
Author: kcc Date: Fri Sep 30 16:57:10 2016 New Revision: 282962 URL: http://llvm.org/viewvc/llvm-project?rev=282962&view=rev Log: [sanitizer-coverage] fix docs Modified: cfe/trunk/docs/SanitizerCoverage.rst Modified: cfe/trunk/docs/SanitizerCoverage.rst URL: http://llvm.org/viewvc/llvm-proj

[PATCH] D24373: [Coroutines] Adding builtins for coroutine intrinsics and backendutil support.

2016-09-30 Thread Gor Nishanov via cfe-commits
GorNishanov added reviewers: rnk, EricWF. GorNishanov updated this revision to Diff 73155. GorNishanov marked an inline comment as done. GorNishanov added a comment. Improved diagnostics in CGCoroutine and ping... https://reviews.llvm.org/D24373 Files: docs/LanguageExtensions.rst include/cl

r282968 - [Sema] Support lax conversions for compound assignments

2016-09-30 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Fri Sep 30 17:19:38 2016 New Revision: 282968 URL: http://llvm.org/viewvc/llvm-project?rev=282968&view=rev Log: [Sema] Support lax conversions for compound assignments Support lax convertions on compound assignment expressions like: typedef __attribute__((vector_size(8))) d

[PATCH] D24472: [Sema] Support lax conversions for compound assignments

2016-09-30 Thread Bruno Cardoso Lopes via cfe-commits
bruno closed this revision. bruno added a comment. Thanks Reid & Akira, Committed r282968 https://reviews.llvm.org/D24472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25131: Fix PR 28885: Fix AST Printer output for inheriting constructor using declarations

2016-09-30 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Minor comment, otherwise LGTM. > DeclPrinter.cpp:1350-1351 > + > + // PR 28885: Use the correct record name when the using declaration is used > + // for inheriting constructors. > + for (

Re: [PATCH] D24861: [Sema] extend Wshift-op-parentheses so it warns for multiplicative operators

2016-09-30 Thread Richard Trieu via cfe-commits
Currently, this warning is on by default. As you said, the results you found look intentional in many cases, so there is a high false positive rate. For on by default warnings, we expect a high true positive rate and intend for users to not disable the warning. From my analysis on a separate cod

r282973 - [coroutines] Diagnose when 'main' is declared as a coroutine.

2016-09-30 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Sep 30 17:38:31 2016 New Revision: 282973 URL: http://llvm.org/viewvc/llvm-project?rev=282973&view=rev Log: [coroutines] Diagnose when 'main' is declared as a coroutine. Summary: The title says it all. Reviewers: rsmith, GorNishanov Subscribers: mehdi_amini, cfe-commits

r282974 - P0035R4: add predefined __STDCPP_DEFAULT_NEW_ALIGNMENT__ macro. By default, we

2016-09-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Sep 30 17:41:36 2016 New Revision: 282974 URL: http://llvm.org/viewvc/llvm-project?rev=282974&view=rev Log: P0035R4: add predefined __STDCPP_DEFAULT_NEW_ALIGNMENT__ macro. By default, we assume that ::operator new provides no more alignment than is necessary for any primit

[PATCH] D22507: Clang-tidy - Enum misuse check

2016-09-30 Thread Peter Szecsi via cfe-commits
szepet added inline comments. > alexfh wrote in SuspiciousEnumUsageCheck.cpp:155 > Why? Because the hasDisjointValueRange function could not decide the values properly. So in case of an empty Enum it would not make sense. Fortunately we know that the empty case should not be reported so used e

[PATCH] D22507: Clang-tidy - Enum misuse check

2016-09-30 Thread Peter Szecsi via cfe-commits
szepet updated this revision to Diff 73157. szepet marked 13 inline comments as done. szepet added a comment. Updates based on comments (the testfile note comments will be added in the next commit) Some changes in the algorithm/design: In non-strict mode the checker will only investigate the ope

r282980 - CodeGen: inherit DLLExport attribute in Windows Itanium

2016-09-30 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Fri Sep 30 18:11:05 2016 New Revision: 282980 URL: http://llvm.org/viewvc/llvm-project?rev=282980&view=rev Log: CodeGen: inherit DLLExport attribute in Windows Itanium When emitting the fundamental type information constants, inherit the DLLExportAttr from `__fundamental_ty

r282981 - Fix bogus "inline namespace cannot be reopened as non-inline" diagnostic to

2016-09-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Sep 30 18:16:08 2016 New Revision: 282981 URL: http://llvm.org/viewvc/llvm-project?rev=282981&view=rev Log: Fix bogus "inline namespace cannot be reopened as non-inline" diagnostic to just warn that the second declaration is missing the 'inline' keyword. This is valid, and

[PATCH] D25068: [coroutines] Switch to using std::experimental namespace per P0057R5

2016-09-30 Thread Richard Smith via cfe-commits
rsmith added inline comments. > SemaDeclCXX.cpp:8157-8160 > + CurContext->getRedeclContext()->isStdNamespace()) { > + PrevNS = getStdExperimentalNamespace(); > + IsStdExperimental = true; > + AddToKnown = !IsInline; If you're going to track the namespace on creation,

[PATCH] D25139: [CUDA] Add Sema::CUDADiagBuilder and Sema::CUDADiagIfDeviceCode().

2016-09-30 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rnk. jlebar added subscribers: tra, cfe-commits. Together these let you easily create diagnostics that - are never emitted for host code - are always emitted for __device__ and __global__ functions, and - are emitted for __host__ __device__ f

[PATCH] D23685: [libcxx] [test] Include the iterator header for back_inserter.

2016-09-30 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT closed this revision. STL_MSFT added a comment. This was checked in ages ago. https://reviews.llvm.org/D23685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25141: [libcxx] [test] Remove MSVC workarounds

2016-09-30 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. MSVC has finally fixed the compiler bug that was warning about unreferenced parameters when invoking destructors, so we can remove the void casts that were working around the

[PATCH] D25139: [CUDA] Add Sema::CUDADiagBuilder and Sema::CUDADiagIfDeviceCode().

2016-09-30 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 73165. jlebar added a comment. Add CUDADiagIfHostCode(). https://reviews.llvm.org/D25139 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaCUDA.cpp clang/lib/Sema/SemaExprCXX.cpp clang/lib/Se

[PATCH] D22973: [libcxx] [test] Add TEST_STACK_ALLOCATOR_WORKAROUND.

2016-09-30 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT added a comment. I know that this stack_allocator issue is a huge headache, but would it be possible to accept this small, non-intrusive diff upstream? This is the last local change that I have. https://reviews.llvm.org/D22973 ___ cfe-com

[PATCH] D25143: [CUDA] Disallow __shared__ variables in host functions.

2016-09-30 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added reviewers: tra, rnk. jlebar added a subscriber: cfe-commits. https://reviews.llvm.org/D25143 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclAttr.cpp clang/test/SemaCUDA/bad-attributes.cu Index: clang/test/SemaCUDA/

[clang-tools-extra] r282984 - Fix tests to not assume they know exactly what will be in Clang's predefines buffer.

2016-09-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Sep 30 18:47:58 2016 New Revision: 282984 URL: http://llvm.org/viewvc/llvm-project?rev=282984&view=rev Log: Fix tests to not assume they know exactly what will be in Clang's predefines buffer. Modified: clang-tools-extra/trunk/test/pp-trace/pp-trace-conditional.cpp

[PATCH] D25129: [CUDA] Disallow __constant__ local variables.

2016-09-30 Thread Justin Lebar via cfe-commits
jlebar added inline comments. > tra wrote in DiagnosticSemaKinds.td:6727 > It's not clear whether you mean global storage class or global namespace. > The code checks for global storage, but error message is could be interpreted > either way, IMO. > > I'll leave phrasing up to you. > It's not

r282985 - [CUDA] Disallow 'extern __shared__' variables.

2016-09-30 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Sep 30 18:57:30 2016 New Revision: 282985 URL: http://llvm.org/viewvc/llvm-project?rev=282985&view=rev Log: [CUDA] Disallow 'extern __shared__' variables. Also add a test that we disallow __constant__ __shared__ int x; because it's possible to break this without break

r282986 - [CUDA] Disallow __constant__ local variables.

2016-09-30 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Sep 30 18:57:34 2016 New Revision: 282986 URL: http://llvm.org/viewvc/llvm-project?rev=282986&view=rev Log: [CUDA] Disallow __constant__ local variables. Reviewers: tra, rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25129 Modified: c

[PATCH] D25129: [CUDA] Disallow __constant__ local variables.

2016-09-30 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL282986: [CUDA] Disallow __constant__ local variables. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25129?vs=73139&id=73168#toc Repository: rL LLVM https://reviews.llvm.or

[PATCH] D25125: [CUDA] Disallow 'extern __shared__' variables.

2016-09-30 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL282985: [CUDA] Disallow 'extern __shared__' variables. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25125?vs=73136&id=73167#toc Repository: rL LLVM https://reviews.llvm.o

r282987 - [CUDA] Harmonize asserts in SemaCUDA, NFC.

2016-09-30 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Sep 30 18:57:38 2016 New Revision: 282987 URL: http://llvm.org/viewvc/llvm-project?rev=282987&view=rev Log: [CUDA] Harmonize asserts in SemaCUDA, NFC. Modified: cfe/trunk/lib/Sema/SemaCUDA.cpp Modified: cfe/trunk/lib/Sema/SemaCUDA.cpp URL: http://llvm.org/viewvc/llv

[PATCH] D25053: [libc++] Correct alignment condition

2016-09-30 Thread Shoaib Meenai via cfe-commits
smeenai added a comment. @mclow.lists Do you have any preference between this and https://reviews.llvm.org/D14259? I'm fine either way, but I'd want one of them to be committed sooner rather than later. https://reviews.llvm.org/D25053 ___ cfe-comm

r282989 - Fix crash when emitting error.

2016-09-30 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Sep 30 19:15:24 2016 New Revision: 282989 URL: http://llvm.org/viewvc/llvm-project?rev=282989&view=rev Log: Fix crash when emitting error. With templated classes, is possible to not be able to determine is a member function is a special member function before the class is

[PATCH] D25139: [CUDA] Add Sema::CUDADiagBuilder and Sema::CUDADiagIfDeviceCode().

2016-09-30 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 73171. jlebar added a comment. Tweak API a bit. Now we rely on an implicit conversion to bool. Which is not great, I know, but in practice I think works better than an explicit named function. https://reviews.llvm.org/D25139 Files: clang/include/clang/Ba

[PATCH] D25143: [CUDA] Disallow __shared__ variables in host functions.

2016-09-30 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 73172. jlebar added a comment. Update to new CUDADiagIfHostCode API. https://reviews.llvm.org/D25143 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclAttr.cpp clang/test/SemaCUDA/bad-attributes.cu Index: clang/test/SemaC

[PATCH] D25145: [libc++] Correct explanation of _LIBCPP_NEW_DELETE_VIS

2016-09-30 Thread Shoaib Meenai via cfe-commits
smeenai created this revision. smeenai added reviewers: compnerd, EricWF, mclow.lists. smeenai added a subscriber: cfe-commits. The behavior of this macro actually needs to apply universally on Windows and not just when using the Microsoft CRT. Update the macro definition and documentation accordi

[PATCH] D25145: [libc++] Correct explanation of _LIBCPP_NEW_DELETE_VIS

2016-09-30 Thread Shoaib Meenai via cfe-commits
smeenai added a comment. My initial understanding of the problem was incorrect; I did some further experimentation and I think I properly understand what's going on here now. Sorry for the churn. https://reviews.llvm.org/D25145 ___ cfe-commits mai

[PATCH] D25068: [coroutines] Switch to using std::experimental namespace per P0057R5

2016-09-30 Thread Eric Fiselier via cfe-commits
EricWF updated this revision to Diff 73181. EricWF added a comment. Address comments about caching the std::experimental namespace. @rsmith could you please double check that `lookupStdExperimentalNamespace()` is correct? https://reviews.llvm.org/D25068 Files: include/clang/Basic/Diagnostic

[PATCH] D25068: [coroutines] Switch to using std::experimental namespace per P0057R5

2016-09-30 Thread Eric Fiselier via cfe-commits
EricWF marked an inline comment as done. EricWF added inline comments. > rsmith wrote in SemaDeclCXX.cpp:8157-8160 > If you're going to track the namespace on creation, you need to add > serialization code for your `Sema::StdExperimentalNamespace` storage. But I'd > suggest taking a different a

[PATCH] D25150: [CUDA] Allow static variables in __host__ __device__ functions, so long as they're never codegen'ed for device.

2016-09-30 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added reviewers: tra, rnk. jlebar added a subscriber: cfe-commits. https://reviews.llvm.org/D25150 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDecl.cpp clang/test/SemaCUDA/device-var-init.cu clang/test/SemaCUDA/static-var

[PATCH] D25130: [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts

2016-09-30 Thread Eric Fiselier via cfe-commits
EricWF added a comment. This LGTM but I can't approve Clang patches, so it'll have to wait on @rsmith . https://reviews.llvm.org/D25130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

r282996 - Use StringRef in Triple API (NFC)

2016-09-30 Thread Mehdi Amini via cfe-commits
Author: mehdi_amini Date: Fri Sep 30 20:16:22 2016 New Revision: 282996 URL: http://llvm.org/viewvc/llvm-project?rev=282996&view=rev Log: Use StringRef in Triple API (NFC) Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp URL: http://llvm.org/viewvc

[PATCH] D22973: [libcxx] [test] Add TEST_STACK_ALLOCATOR_WORKAROUND.

2016-09-30 Thread Eric Fiselier via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. I'm OK accepting this, but I'm going to weak it before committing so that `test_macros.h` define `TEST_STACK_ALLOCATOR_WORKAROUND` for non-libc++ builds. https://reviews.llvm.org/D22973 __

r283004 - Use StringRef in Pass/PassManager APIs (NFC)

2016-09-30 Thread Mehdi Amini via cfe-commits
Author: mehdi_amini Date: Fri Sep 30 21:56:57 2016 New Revision: 283004 URL: http://llvm.org/viewvc/llvm-project?rev=283004&view=rev Log: Use StringRef in Pass/PassManager APIs (NFC) Modified: cfe/trunk/lib/CodeGen/CodeGenAction.cpp Modified: cfe/trunk/lib/CodeGen/CodeGenAction.cpp URL: htt

<    1   2