r270170 - Re-alphabetize this file list.

2016-05-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu May 19 20:07:10 2016 New Revision: 270170 URL: http://llvm.org/viewvc/llvm-project?rev=270170&view=rev Log: Re-alphabetize this file list. Modified: cfe/trunk/lib/Headers/CMakeLists.txt Modified: cfe/trunk/lib/Headers/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-

Re: [PATCH] D20457: Update -ffast-math documentation to match reality.

2016-05-19 Thread Richard Smith via cfe-commits
On Thu, May 19, 2016 at 6:11 PM, Justin Lebar via cfe-commits < cfe-commits@lists.llvm.org> wrote: > jlebar created this revision. > jlebar added a reviewer: rsmith. > jlebar added a subscriber: cfe-commits. > > http://reviews.llvm.org/D20457 > > Files: > include/clang/Basic/LangOptions.def >

Re: [PATCH] D15421: [Feature] Add a builtin for indexing into parameter packs

2016-05-19 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Sorry for the delay, this all LGTM. Do you need someone to commit it for you? Comment at: lib/Sema/SemaTemplate.cpp:2082-2085 @@ +2081,6 @@ +// If the Index is out of boun

Re: r270089 - [MS ABI] Ignore transparent contexts when determining the effective context

2016-05-19 Thread Richard Smith via cfe-commits
On Thu, May 19, 2016 at 11:15 AM, David Majnemer via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: majnemer > Date: Thu May 19 13:15:53 2016 > New Revision: 270089 > > URL: http://llvm.org/viewvc/llvm-project?rev=270089&view=rev > Log: > [MS ABI] Ignore transparent contexts when deter

Re: [PATCH] D20457: Update -ffast-math documentation to match reality.

2016-05-20 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: docs/UsersManual.rst:1067 @@ +1066,3 @@ + ``(a + b) * c == a * c + b * c``), + * operands to fp operations are not equal to ``NaN`` and ``Inf``, and + * ``+0`` and ``-0`` are interc

Re: [PATCH] D18557: [Clang][ARM] __va_list declaration is not saved in ASTContext causing compilation error or crash

2016-03-29 Thread Richard Smith via cfe-commits
rsmith added a comment. Thanks, the change itself LGTM, but please add your testcase, perhaps to test/PCH/__va_list_tag.c Repository: rL LLVM http://reviews.llvm.org/D18557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

Re: [PATCH] D18540: [Sema] Note when we've actually encountered a failure in ExprConstant, and take that into account when looking up objects.

2016-03-29 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/Expr.h:541-546 @@ -540,1 +540,8 @@ +/// \brief Whether the evaluation was unable to reduce a construct to a +/// value. +/// +/// For example, in foo(bar, baz, qux), if evaluating bar fails, we may +

Re: [PATCH] D15031: CFG: Add CFGElement for automatic variables that leave the scope

2016-03-30 Thread Richard Smith via cfe-commits
rsmith added a comment. Please add a test that builds and dumps a CFG and checks it has the right shape. It's generally not sufficient for the only tests for one LLVM project to exist in a different LLVM project. See test/Analysis/cfg.cpp for an example of how to do this. Com

Re: [PATCH] Canonicalize UnaryTransformType types when they don't have a known underlying type

2016-03-30 Thread Richard Smith via cfe-commits
the underlying >> type for your sugared UnaryTransformType. >> The attached patch follows the getDecltypeType approach. >> --Vassil >> On 24/02/16 23:09, Richard Smith wrote: >>> >>> A UnaryTransformType should itself be a canonical type if its BaseType >>

Re: [PATCH] D18557: [Clang][ARM] __va_list declaration is not saved in ASTContext causing compilation error or crash

2016-03-30 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: test/PCH/arm-__va_list_tag.c:1-7 @@ +1,8 @@ +// REQUIRES: arm-registered-target + +// This test checks the patch for the compilation error / crash described in the D18557. + +// Test as a C source +// RUN: %clang_cc1 -triple=armv7-linux-g

Re: [PATCH] D18557: [Clang][ARM] __va_list declaration is not saved in ASTContext causing compilation error or crash

2016-03-30 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, do you need someone to commit this for you? Repository: rL LLVM http://reviews.llvm.org/D18557 ___ cfe-commits mailing list cfe-commits@

Re: [PATCH] D18501: Fix compilation on FreeBSD

2016-03-30 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. libc++'s converts the `signbit` macro into a function. If you're not seeing a function here, that suggests your include paths are messed up and the C library is being found before libc++'s . http://reviews.llvm.org/D18501

Re: r264908 - [modules] Add a regression test for PR21547.

2016-03-30 Thread Richard Smith via cfe-commits
On Wed, Mar 30, 2016 at 1:10 PM, Vassil Vassilev via cfe-commits wrote: > Author: vvassilev > Date: Wed Mar 30 15:10:07 2016 > New Revision: 264908 > > URL: http://llvm.org/viewvc/llvm-project?rev=264908&view=rev > Log: > [modules] Add a regression test for PR21547. > > Added: > cfe/trunk/test

Re: [PATCH] D18380: [CUDA] Make unattributed constexpr functions (usually) implicitly host+device.

2016-03-30 Thread Richard Smith via cfe-commits
rsmith added a comment. LGTM http://reviews.llvm.org/D18380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18654: In C++11 it is undefined to shift into the sign bit

2016-03-31 Thread Richard Smith via cfe-commits
rsmith requested changes to this revision. rsmith added a comment. This revision now requires changes to proceed. Core issue 1457 is a DR against C++11, so it applies to our C++11 mode. http://reviews.llvm.org/D18654 ___ cfe-commits mailing list cfe

Re: [PATCH] D18653: [Sema] Diagnose template alias declaration in local class

2016-03-31 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: test/CXX/temp/temp.decls/temp.mem/p2.cpp:11 @@ -10,2 +10,3 @@ template void qux(); // expected-error{{templates cannot be declared inside of a local class}} +template using

Re: [PATCH] D18654: In C++11 it is undefined to shift into the sign bit

2016-03-31 Thread Richard Smith via cfe-commits
rsmith added a comment. In http://reviews.llvm.org/D18654#388419, @filcab wrote: > That means that our C++11 mode will have some fixes, right? Right. The standard's rules are often incoherent or unimplementable without the fixes in DRs, so it's not meaningful to implement ISO C++ as standardiz

Re: [PATCH] D18652: [Inline asm] Correctly parse GCC-style asm line following MS-style asm line

2016-03-31 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: lib/Parse/ParseStmtAsm.cpp:423 @@ -421,3 +422,3 @@ bool isAsm = Tok.is(tok::kw_asm); -if (SingleLineMode && !isAsm) +if (SingleLineMode && (!isAsm || NextToken().is(tok::l_paren))) break; --

Re: [PATCH] D18567: Block: Fix a crash when we have type attributes or qualifiers with omitted return type.

2016-03-31 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: lib/Sema/SemaType.cpp:1569 @@ +1568,3 @@ +// Mark them as invalid. +attr.setInvalid(); + } rjmccall wrote: > manmanren wrote: > > rjmccall wrote: > > > It's not generally a good idea to set things

Re: [PATCH] D18635: Rework interface for bitset-using features to use a notion of class scope.

2016-03-31 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: docs/ClassScope.rst:2 @@ +1,3 @@ +=== +Class Scope +=== Can you use some word other than "scope" here? "Class scope" is already a term of art in C++, meaning something completely different. I think what yo

Re: [PATCH] D17933: Set MaxAtomicInlineWidth properly for i386, i486, and x86-64 cpus without cmpxchg16b.

2016-03-31 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: lib/Basic/Targets.cpp:4080 @@ -4079,1 +4079,3 @@ +// x86-64 has atomics up to 16 bytes, when the HasCX16 target +// feature is enabled, 64 otherwise. MaxAtomicPromoteWidth = 128; ... where by 64, you mean

Re: [PATCH] D18635: Rework interface for bitset-using features to use a notion of class scope.

2016-03-31 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: docs/ClassScope.rst:2 @@ +1,3 @@ +=== +Class Scope +=== pcc wrote: > rsmith wrote: > > Can you use some word other than "scope" here? "Class scope" is already a > > term of art in C++, meaning something co

Re: [PATCH] D18635: Rework interface for bitset-using features to use a notion of class scope.

2016-03-31 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: docs/ClassScope.rst:2 @@ +1,3 @@ +=== +Class Scope +=== pcc wrote: > rsmith wrote: > > pcc wrote: > > > rsmith wrote: > > > > Can you use some word other than "scope" here? "Class scope" is already > > > >

Re: [PATCH] D18567: Block: Fix a crash when we have type attributes or qualifiers with omitted return type.

2016-03-31 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaType.cpp:1253-1254 @@ -1252,4 +1253,4 @@ break; } else if (declarator.getContext() == Declarator::LambdaExprContext || isOmittedBlockReturnType(declarator)) { Result = Context.DependentTy; --

Re: [PATCH] D18698: [C11] PR24451: Allow restrict _Atomic pointers

2016-04-01 Thread Richard Smith via cfe-commits
rsmith added a comment. I'm not convinced this change is correct. There are two possibilities for what `int *_Atomic restrict` could mean: 1. `_Atomic(int *restrict)`: this seems to be ill-formed by 6.7.2.4/3, because the type name in an atomic type specifier cannot be a qualified type 2. `_Ato

Re: [RFC] [PATCH] Announcing new Clang Diagnostic Personalities

2016-04-01 Thread Richard Smith via cfe-commits
Wonderful work, I look forward to it landing in SVN. Only one concern: the choice to select the personality during compilation seems to create problems: * We won't have an easy way to check that changes that add / change diagnostics correctly update all the personalities * Distributions would p

r265195 - [modules] Start moving the code for encoding AST records out of ASTWriter into

2016-04-01 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Apr 1 17:52:03 2016 New Revision: 265195 URL: http://llvm.org/viewvc/llvm-project?rev=265195&view=rev Log: [modules] Start moving the code for encoding AST records out of ASTWriter into a separate class. The goal is for this class to have a separate lifetime from the AST

Re: [PATCH] D18708: Set C99 as default C Standard for PS4 target

2016-04-01 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. What's the motivation for this change? Clang's C11 mode should accept all code accepted by its C99 mode (and conversely, most or perhaps all of the C11 language features are accepted by default in C99 mode as an extension). Is the probl

Re: [PATCH] D18708: Set C99 as default C Standard for PS4 target

2016-04-01 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a reviewer: rsmith. rsmith added a comment. This revision is now accepted and ready to land. In http://reviews.llvm.org/D18708#390150, @dyung wrote: > From my understanding, there are 2 issues that block us. The first is that we > currently do not ship

Re: [PATCH] D17149: Consolidate and improve the handling of built-in feature-like macros

2016-04-03 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Lex/PPMacroExpansion.cpp:1430-1432 @@ +1429,5 @@ +Preprocessor &PP, +int(*Op)(Token &Tok, + Pre

Re: [PATCH] D18540: [Sema] Note when we've actually encountered a failure in ExprConstant, and take that into account when looking up objects.

2016-04-04 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/ExprConstant.cpp:782 @@ +781,3 @@ +LLVM_ATTRIBUTE_UNUSED_RESULT bool noteUnrecoverableFailure() { + // This is a little bit icky. We leave HasSideEffects unchange if we + // aren't going to keep running, because eval

Re: [PATCH] D18425: [Sema] Make enable_if act correctly with value dependent conditions/arguments

2016-04-04 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Sema/Sema.h:2489 @@ -2485,1 +2488,3 @@ + bool MissingImplicitThis = false, + bool *FailedDueToValueDependentExpr = nullptr); I'd just call this `Dep

Re: [PATCH] D17149: Consolidate and improve the handling of built-in feature-like macros

2016-04-04 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a reviewer: rsmith. This revision is now accepted and ready to land. Comment at: lib/Lex/PPMacroExpansion.cpp:1489-1492 @@ +1488,6 @@ +// a diagnostic and a dummy value. +if (Result.hasValue()) + OS << Result.get

Re: [libcxx] r265358 - Put back the undefs that Richard removed. Boost won't build w/o these; specifically the file 'bytes_methods.h' in Apple's python framework defines these.

2016-04-04 Thread Richard Smith via cfe-commits
On Mon, Apr 4, 2016 at 3:49 PM, Marshall Clow via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: marshall > Date: Mon Apr 4 17:49:20 2016 > New Revision: 265358 > > URL: http://llvm.org/viewvc/llvm-project?rev=265358&view=rev > Log: > Put back the undefs that Richard removed. Boost wo

Re: [PATCH] D18708: Set C99 as default C Standard for PS4 target

2016-04-04 Thread Richard Smith via cfe-commits
On Fri, Apr 1, 2016 at 6:43 PM, Douglas Yung < douglas_y...@playstation.sony.com> wrote: > dyung added a comment. > > In http://reviews.llvm.org/D18708#390166, @rsmith wrote: > > > In http://reviews.llvm.org/D18708#390150, @dyung wrote: > > > > > From my understanding, there are 2 issues that bloc

Re: [PATCH] D18776: NFC: make AtomicOrdering an enum class

2016-04-04 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith accepted this revision. rsmith added a reviewer: rsmith. rsmith added a comment. This revision is now accepted and ready to land. LGTM. Post-commit review is fine for changes like this that mechanically update Clang to match LLVM API changes. http://rev

r265364 - Move local helper class into anonymous namespace.

2016-04-04 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Apr 4 18:29:43 2016 New Revision: 265364 URL: http://llvm.org/viewvc/llvm-project?rev=265364&view=rev Log: Move local helper class into anonymous namespace. Modified: cfe/trunk/lib/AST/ExprConstant.cpp Modified: cfe/trunk/lib/AST/ExprConstant.cpp URL: http://llvm.o

Re: [PATCH] D18425: [Sema] Make enable_if act correctly with value dependent conditions/arguments

2016-04-04 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaExpr.cpp:5218-5221 @@ -5209,1 +5217,6 @@ + Fn, NDecl, LParenLoc, ArgExprs, RParenLoc, ExecConfig, IsExecConfig); + + if (MakeCallInstantiationDependent) +BuiltCall.get()->setInstantiationDependent(true); + return Bu

Re: [PATCH] D17043: Check that the result of a library call w/o side effects is used

2016-04-05 Thread Richard Smith via cfe-commits
rsmith added a comment. The version of this attribute that was voted into the C++ standard (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0189r1.pdf) does not support a message, and I expect that is the version that libc++ will want to use. I think we should at least improve Clang's

r265571 - Diagnose template alias declarations in local classes.

2016-04-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Apr 6 12:38:58 2016 New Revision: 265571 URL: http://llvm.org/viewvc/llvm-project?rev=265571&view=rev Log: Diagnose template alias declarations in local classes. Patch by Erik Pilkington! Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp cfe/trunk/test/CXX/temp/temp.

Re: [PATCH] D18653: [Sema] Diagnose template alias declaration in local class

2016-04-06 Thread Richard Smith via cfe-commits
rsmith closed this revision. rsmith added a comment. Landed as r265571. http://reviews.llvm.org/D18653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r265594 - Minor simplifications.

2016-04-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Apr 6 15:12:34 2016 New Revision: 265594 URL: http://llvm.org/viewvc/llvm-project?rev=265594&view=rev Log: Minor simplifications. Modified: cfe/trunk/include/clang/Serialization/ASTWriter.h cfe/trunk/lib/Serialization/ASTWriterDecl.cpp cfe/trunk/lib/Serializa

r265598 - Fix order-of-evaluation bug (causing GCC buildbots to fail).

2016-04-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Apr 6 15:57:53 2016 New Revision: 265598 URL: http://llvm.org/viewvc/llvm-project?rev=265598&view=rev Log: Fix order-of-evaluation bug (causing GCC buildbots to fail). Modified: cfe/trunk/lib/Serialization/ASTWriterStmt.cpp Modified: cfe/trunk/lib/Serialization/ASTW

Re: [PATCH] D17362: [Sema] PR23090 Crash when return type or parameter types for extern "C" functions don't have external linkage

2016-04-07 Thread Richard Smith via cfe-commits
rsmith requested changes to this revision. rsmith added a comment. This revision now requires changes to proceed. Why do you think this is ill-formed? Using a type with internal linkage as the type of an extern "C" function is explicitly permitted by the C++ standard. [basic.link]p8 says: "A ty

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-07 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDecl.cpp:1615 @@ -1614,2 +1614,3 @@ IdResolver.RemoveDecl(D); +ShadowingDecls.erase(D); } This'd be a good place to produce a -Wshadow-constructor or similar warning if D is still in the map. ===

r265718 - [modules] Allow differences in flags that only affect preprocessor predefines

2016-04-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 7 15:47:37 2016 New Revision: 265718 URL: http://llvm.org/viewvc/llvm-project?rev=265718&view=rev Log: [modules] Allow differences in flags that only affect preprocessor predefines (and __has_feature checks) between explicitly-specified module files and the current co

r265728 - Replace Sema-level implementation of -fassume-sane-operator-new with a

2016-04-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 7 16:46:12 2016 New Revision: 265728 URL: http://llvm.org/viewvc/llvm-project?rev=265728&view=rev Log: Replace Sema-level implementation of -fassume-sane-operator-new with a CodeGen-level implementation. Instead of adding an attribute to clang's FunctionDecl, add the

Re: [PATCH] D18868: [Sema] PR27155: Fix a template argument deduction bug with base classes

2016-04-07 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaTemplateDeduction.cpp:1424-1426 @@ -1423,2 +1423,5 @@ + SmallVector DeducedOrig(Deduced.begin(), + Deduced.end()); + // Try to deduce template arguments fr

Re: [PATCH] D18868: [Sema] PR27155: Fix a template argument deduction bug with base classes

2016-04-07 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: lib/Sema/SemaTemplateDeduction.cpp:1449-1451 @@ +1448,5 @@ + + const RecordType *RecordT = Arg->getAs(); + if (!RecordT) +return Result; + Can you move th

r265756 - [modules] Don't write @import in -E output if the current language mode doesn't

2016-04-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 7 19:09:53 2016 New Revision: 265756 URL: http://llvm.org/viewvc/llvm-project?rev=265756&view=rev Log: [modules] Don't write @import in -E output if the current language mode doesn't support @import; use the form as written instead. Added: cfe/trunk/test/Modules/

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-07 Thread Richard Smith via cfe-commits
On Thu, Apr 7, 2016 at 5:12 PM, David Blaikie wrote: > On Thu, Apr 7, 2016 at 5:05 PM, Reid Kleckner via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> rnk updated this revision to Diff 52982. >> rnk marked 3 inline comments as done. >> rnk added a comment. >> >> - Add -Wshadow-all and -

Re: r265756 - [modules] Don't write @import in -E output if the current language mode doesn't

2016-04-07 Thread Richard Smith via cfe-commits
On Thu, Apr 7, 2016 at 5:17 PM, Sean Silva via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Thu, Apr 7, 2016 at 5:09 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rsmith >> Date: Thu Apr 7 19:09:53 2016 >&g

Re: [PATCH] D17407: [Sema] PR25755 Fix crash when initializing out-of-order struct references

2016-04-07 Thread Richard Smith via cfe-commits
rsmith added a comment. In http://reviews.llvm.org/D17407#385208, @hintonda wrote: > I'm probably missing something, but isn't > InitListChecker::CheckStructUnionTypes() called recursively, if indirectly? > In which case we'd want to start from the Field iterator we were given, not > the look

r265766 - [modules] Add a comment to explain why -E leaves some #includes in the preprocessed output.

2016-04-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 7 20:23:59 2016 New Revision: 265766 URL: http://llvm.org/viewvc/llvm-project?rev=265766&view=rev Log: [modules] Add a comment to explain why -E leaves some #includes in the preprocessed output. Modified: cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp cf

r265838 - [modules] Handle merged fields in designated initializers.

2016-04-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Apr 8 14:57:40 2016 New Revision: 265838 URL: http://llvm.org/viewvc/llvm-project?rev=265838&view=rev Log: [modules] Handle merged fields in designated initializers. Modified: cfe/trunk/lib/Sema/SemaInit.cpp cfe/trunk/test/Modules/Inputs/merge-decl-context/a.h

r265848 - PR25501: Delay loading visible updates for a declaration until after we've

2016-04-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Apr 8 15:53:26 2016 New Revision: 265848 URL: http://llvm.org/viewvc/llvm-project?rev=265848&view=rev Log: PR25501: Delay loading visible updates for a declaration until after we've processed update records. If an update record adds a definition, we need to merge that wit

r265857 - Remove unused functions from ASTWriter interface.

2016-04-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Apr 8 16:54:32 2016 New Revision: 265857 URL: http://llvm.org/viewvc/llvm-project?rev=265857&view=rev Log: Remove unused functions from ASTWriter interface. Modified: cfe/trunk/include/clang/Serialization/ASTWriter.h cfe/trunk/lib/Serialization/ASTWriter.cpp Mod

Re: [PATCH] D18953: [ms][dll] #26935 Defining a dllimport function should cause it to be exported

2016-04-11 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDecl.cpp:5570 @@ -5565,3 +5569,3 @@ // and qualified friend declarations. - // NB: MSVC converts such a declaration to dllexport. + // NB: MSVC converts such a declaration to dllexport that's why we do it also. bool I

Re: [PATCH] D18823: Implementation of VlA of GNU C++ extension

2016-04-11 Thread Richard Smith via cfe-commits
rsmith added a comment. @vbyakovl The description of this patch is very misleading. What I believe this does is to allow VLAs with non-trivially-destructed element types. Can you fix the description (and make sure the fixed version ends up in the commit message if this is approved)? @rjmccall D

Re: [PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-11 Thread Richard Smith via cfe-commits
rsmith added a comment. Can you find who's poisoning the `FileManager`'s idea of the name of the file with a full path to the VFS overlay and fix that? Comment at: lib/Lex/HeaderSearch.cpp:1163 @@ +1162,3 @@ +SmallString<256> RootName = StringRef(Root->getName()); +path

Re: [PATCH] D18823: Implementation of VlA of GNU C++ extension

2016-04-11 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: llvm/tools/clang/lib/Sema/SemaType.cpp:2158-2159 @@ -2157,3 +2157,4 @@ if (!getLangOpts().C99) { -if (T->isVariableArrayType()) { +if (T->isVariableArrayType() && +!(getLangOpts().CPlusPlus && getLangOpts().GNUMode)) {

Re: [PATCH] D18914: [clang-tidy] new readability-redundant-inline

2016-04-11 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: test/clang-tidy/readability-redundant-inline.cpp:5 @@ +4,3 @@ + inline int f1() { +// CHECK-MESSAGES: :[[@LINE-1]]:14: warning: 'inline' is redundant because method body is defined inside class [readability-redundant-inline] +// CHE

r266113 - [modules] When an incompatible module file is explicitly provided for a module,

2016-04-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Apr 12 14:58:30 2016 New Revision: 266113 URL: http://llvm.org/viewvc/llvm-project?rev=266113&view=rev Log: [modules] When an incompatible module file is explicitly provided for a module, and we fall back to textual inclusion, don't require the module as a whole to be mark

r266116 - [modules] Extend r266113 to cope with submodules.

2016-04-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Apr 12 15:20:33 2016 New Revision: 266116 URL: http://llvm.org/viewvc/llvm-project?rev=266116&view=rev Log: [modules] Extend r266113 to cope with submodules. Modified: cfe/trunk/lib/Lex/PPDirectives.cpp cfe/trunk/test/Modules/explicit-build-missing-files.cpp Modi

r266176 - [modules] Add some missing blockinfo records. No functionality change except to llvm-bcanalyzer output.

2016-04-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Apr 13 02:41:35 2016 New Revision: 266176 URL: http://llvm.org/viewvc/llvm-project?rev=266176&view=rev Log: [modules] Add some missing blockinfo records. No functionality change except to llvm-bcanalyzer output. Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp Mo

r266178 - constexpr -> const to appease MSVC bots.

2016-04-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Apr 13 02:47:38 2016 New Revision: 266178 URL: http://llvm.org/viewvc/llvm-project?rev=266178&view=rev Log: constexpr -> const to appease MSVC bots. Modified: cfe/trunk/include/clang/Serialization/ASTWriter.h Modified: cfe/trunk/include/clang/Serialization/ASTWriter.

Re: [PATCH] D16396: Warn if variable cannot be implicitly instantiated

2016-04-13 Thread Richard Smith via cfe-commits
rsmith added a comment. I would prefer to avoid adding the `%qt` format if we can. But if we do provide it, the template parameter names we use should match what was written in the declaration of the template itself. Comment at: lib/AST/Decl.cpp:1423 @@ +1422,3 @@ +/// +/// is

Re: [PATCH] D18823: Implementation of VlA of GNU C++ extension

2016-04-13 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: llvm/tools/clang/lib/Sema/SemaType.cpp:2163-2165 @@ -2161,3 +2162,5 @@ if (!T->isDependentType() && isCompleteType(Loc, BaseT) && - !BaseT.isPODType(Context) && !BaseT->isObjCLifetimeType()) { + RD && !RD->hasDefau

r266254 - [modules] Remove CXX_CTOR_INITIALIZERS_OFFSETS table. Instead of storing an ID

2016-04-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Apr 13 16:57:08 2016 New Revision: 266254 URL: http://llvm.org/viewvc/llvm-project?rev=266254&view=rev Log: [modules] Remove CXX_CTOR_INITIALIZERS_OFFSETS table. Instead of storing an ID of a table entry in the corresponding decl, store an offset from the current record to

r266266 - [modules] Remove CXX_BASE_SPECIFIERS_OFFSETS table. Instead of storing an ID of

2016-04-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Apr 13 19:29:55 2016 New Revision: 266266 URL: http://llvm.org/viewvc/llvm-project?rev=266266&view=rev Log: [modules] Remove CXX_BASE_SPECIFIERS_OFFSETS table. Instead of storing an ID of a table entry in the corresponding decl, store an offset from the current record to t

r266353 - Fix off-by-one error in worst-case number of offsets needed for an AST record.

2016-04-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 14 13:32:54 2016 New Revision: 266353 URL: http://llvm.org/viewvc/llvm-project?rev=266353&view=rev Log: Fix off-by-one error in worst-case number of offsets needed for an AST record. Modified: cfe/trunk/include/clang/Serialization/ASTWriter.h cfe/trunk/test/Mo

Re: r266160 - [modules] Refactor handling of cases where we write an offset to a prior record into the bitstream and simplify a little, in preparation for doing this in more cases.

2016-04-14 Thread Richard Smith via cfe-commits
r266353. On Thu, Apr 14, 2016 at 11:09 AM, Richard Smith wrote: > On Thu, Apr 14, 2016 at 9:00 AM, Nico Weber wrote: > >> On Wed, Apr 13, 2016 at 10:24 PM, Nico Weber wrote: >> >>> On Tue, Apr 12, 2016 at 10:12 PM, Richard Smith via cfe-commits < >>

Re: r266254 - [modules] Remove CXX_CTOR_INITIALIZERS_OFFSETS table. Instead of storing an ID

2016-04-14 Thread Richard Smith via cfe-commits
2016 at 5:57 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rsmith >> Date: Wed Apr 13 16:57:08 2016 >> New Revision: 266254 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=266254&view=rev >> Log: >>

r266359 - Make this code less brittle. The benefits of a fixed-size array aren't worth the maintenance cost.

2016-04-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 14 14:45:19 2016 New Revision: 266359 URL: http://llvm.org/viewvc/llvm-project?rev=266359&view=rev Log: Make this code less brittle. The benefits of a fixed-size array aren't worth the maintenance cost. Modified: cfe/trunk/include/clang/Serialization/ASTWriter.h

Re: [PATCH] D18956: [Sema] Fix assertion failure at vector comparison

2016-04-14 Thread Richard Smith via cfe-commits
rsmith requested changes to this revision. rsmith added a comment. This revision now requires changes to proceed. I agree. In the example, the type of `y == z` should be `vec`, not `int` -- we should "promote" to the vector type. Repository: rL LLVM http://reviews.llvm.org/D18956

Re: [PATCH] D18698: [C11] PR24451: Allow restrict _Atomic pointers

2016-04-14 Thread Richard Smith via cfe-commits
rsmith added a comment. I mailed WG14 asking for clarification on how these rules are supposed to work (10 days ago) and am yet to hear anything in response. Is this apparent GCC extension/bug seeing much use in the wild? If not, I think our path forward is to file this as a bug against GCC and

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-14 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDecl.cpp:6417-6425 @@ +6416,11 @@ +if (isa(NewDC) && isa(D)) { + if (Diags.isIgnored(diag::warn_ctor_parm_shadows_field, R.getNameLoc())) { +D = D->getCanonicalDecl(); +ShadowingDecls.insert({D, FD});

Re: [PATCH] D19175: Fix for PR27015 (variable template initialized with a generic lambda expression)

2016-04-15 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3899-3901 @@ -3898,5 +3898,5 @@ // Instantiate the initializer. ExprResult Init = SubstInitializer(OldVar->getInit(), TemplateArgs, - OldVar->getInitStyle(

Re: [PATCH] D15509: Suggest missing 'template' for dependent member templates

2016-04-15 Thread Richard Smith via cfe-commits
rsmith requested changes to this revision. This revision now requires changes to proceed. Comment at: lib/Parse/ParseTemplate.cpp:1233-1240 @@ -1240,1 +1232,10 @@ + + SuppressAllDiagnostics S(Diags); + GreaterThanIsOperatorScope G(GreaterThanIsOperator, false); + TemplateArgLis

Re: [PATCH] D16396: Warn if variable cannot be implicitly instantiated

2016-04-15 Thread Richard Smith via cfe-commits
rsmith added a comment. I have a lingering concern with this style of formatting, because it risks making our diagnostics (more) ambiguous. Consider this: template struct X {}; struct T {}; X xt; If we give a diagnostic talking about `X`, it's ambiguous whether we're referring to the

Re: [PATCH] D19062: Add functions in ctype.h to builtin function database (Fix)

2016-04-15 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a reviewer: rsmith. rsmith added a comment. This revision is now accepted and ready to land. LGTM too, but please wait for @joerg's review as e had concerns about the previous revision. http://reviews.llvm.org/D19062 ___

Re: [PATCH] D16396: Warn if variable cannot be implicitly instantiated

2016-04-15 Thread Richard Smith via cfe-commits
On Fri, Apr 15, 2016 at 12:56 AM, Serge Pavlov via cfe-commits < cfe-commits@lists.llvm.org> wrote: > 2016-04-14 2:44 GMT+06:00 Richard Smith : > >> rsmith added a comment. >> >> I would prefer to avoid adding the `%qt` format if we can. But if we do >> provide

r266495 - Improve diagnostic for the case when a non-defined function-like macro is used

2016-04-15 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Apr 15 19:07:09 2016 New Revision: 266495 URL: http://llvm.org/viewvc/llvm-project?rev=266495&view=rev Log: Improve diagnostic for the case when a non-defined function-like macro is used in a preprocessor constant expression. Modified: cfe/trunk/include/clang/Basic/Di

r266501 - [modules] Don't expose *intrin.h headers that cannot be included standalone as

2016-04-15 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Apr 15 19:46:26 2016 New Revision: 266501 URL: http://llvm.org/viewvc/llvm-project?rev=266501&view=rev Log: [modules] Don't expose *intrin.h headers that cannot be included standalone as separate modules. These cause build breakage with -fmodules-local-submodule-visibilit

Re: r266561 - Implement CWG 941 - explicit specializations of deleted function templates

2016-04-17 Thread Richard Smith via cfe-commits
On Sun, Apr 17, 2016 at 10:32 AM, Faisal Vali via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: faisalv > Date: Sun Apr 17 12:32:04 2016 > New Revision: 266561 > > URL: http://llvm.org/viewvc/llvm-project?rev=266561&view=rev > Log: > Implement CWG 941 - explicit specializations of del

Re: [PATCH] D16396: Warn if variable cannot be implicitly instantiated

2016-04-18 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Thanks! http://reviews.llvm.org/D16396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

Re: r265766 - [modules] Add a comment to explain why -E leaves some #includes in the preprocessed output.

2016-04-18 Thread Richard Smith via cfe-commits
On Mon, Apr 18, 2016 at 6:28 AM, Vassil Vassilev wrote: > On 08/04/16 03:24, Richard Smith via cfe-commits wrote: > >> Author: rsmith >> Date: Thu Apr 7 20:23:59 2016 >> New Revision: 265766 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=265766&view=r

Re: r266645 - [Parser][ObjC] Make sure c++11 in-class initialization is done when the

2016-04-18 Thread Richard Smith via cfe-commits
On Mon, Apr 18, 2016 at 11:19 AM, Akira Hatanaka via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: ahatanak > Date: Mon Apr 18 13:19:45 2016 > New Revision: 266645 > > URL: http://llvm.org/viewvc/llvm-project?rev=266645&view=rev > Log: > [Parser][ObjC] Make sure c++11 in-class initial

Re: r265766 - [modules] Add a comment to explain why -E leaves some #includes in the preprocessed output.

2016-04-18 Thread Richard Smith via cfe-commits
On Mon, Apr 18, 2016 at 11:49 AM, Vassil Vassilev wrote: > On 18/04/16 20:32, Richard Smith wrote: > > On Mon, Apr 18, 2016 at 6:28 AM, Vassil Vassilev < > v.g.vassi...@gmail.com> wrote: > >> On 08/04/16 03:24, Richard Smith via cfe-commits wrote: >> >>>

r266687 - [modules] Remove some more unnecessary forwarding functions.

2016-04-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Apr 18 16:54:58 2016 New Revision: 266687 URL: http://llvm.org/viewvc/llvm-project?rev=266687&view=rev Log: [modules] Remove some more unnecessary forwarding functions. Modified: cfe/trunk/include/clang/Serialization/ASTWriter.h cfe/trunk/lib/Serialization/ASTWrit

r266695 - Mark -Xclang as being a compilation-only option so that the clang driver

2016-04-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Apr 18 18:12:59 2016 New Revision: 266695 URL: http://llvm.org/viewvc/llvm-project?rev=266695&view=rev Log: Mark -Xclang as being a compilation-only option so that the clang driver doesn't warn if it's passed to a link action. This matches the behavior for most other compi

Re: [PATCH] D19244: Extend checking of va_start builtin

2016-04-18 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7417-7421 @@ -7416,4 +7416,7 @@ InGroup; -def warn_va_start_of_reference_type_is_undefined : Warning< - "'va_start' has undefined behavior with reference types">, InGroup; +def warn_va_start_t

Re: [PATCH] D19244: Extend checking of va_start builtin

2016-04-18 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7417-7421 @@ -7416,4 +7416,7 @@ InGroup; -def warn_va_start_of_reference_type_is_undefined : Warning< - "'va_start' has undefined behavior with reference types">, InGroup; +def warn_va_start_t

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-19 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDecl.cpp:6437-6445 @@ +6436,11 @@ + // Warn immediately if -Wshadow-field-in-constructor is set. + Diag(R.getNameLoc(), diag::warn_ctor_parm_shadows_field) + << D << FD << FD->getParent(); + Diag(FD->ge

Re: [PATCH] D18635: Rework interface for bitset-using features to use a notion of LTO visibility.

2016-04-19 Thread Richard Smith via cfe-commits
rsmith added a comment. Generally-speaking, I think this is looking really good. I think we need to be careful and precise in how we document this new visibility notion; most of my comments are on that. I wonder if we'd benefit from a diagram in the documentation showing the nesting levels bet

Re: [PATCH] D19336: Repair redeclaration chain of friend template functions.

2016-04-20 Thread Richard Smith via cfe-commits
rsmith added a comment. Sorry, I don't think this approach can work. Consider: template struct X { template friend void f(T); template friend void f(U); }; These two friend declarations declare different friend function templates, but this transformation would incorrectly make them

Re: [PATCH] D18953: [ms][dll] #26935 Defining a dllimport function should cause it to be exported

2016-04-20 Thread Richard Smith via cfe-commits
rsmith added a comment. In http://reviews.llvm.org/D18953#397279, @rnk wrote: > Richard, do you think we should be handling this by rewriting the AST-level > attribute in Sema or by changing our interpretation of things in CodeGen? > We're already creating a bunch of implicit attributes to impl

Re: [PATCH] D18652: [Inline asm] Correctly parse GCC-style asm line following MS-style asm line

2016-04-20 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, thank you! http://reviews.llvm.org/D18652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

Re: [libunwind] r266926 - unwind: unify the definition of _LIBUNWIND_SUPPORT_FRAME_APIS

2016-04-20 Thread Richard Smith via cfe-commits
On Wed, Apr 20, 2016 at 3:18 PM, Saleem Abdulrasool via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: compnerd > Date: Wed Apr 20 17:18:47 2016 > New Revision: 266926 > > URL: http://llvm.org/viewvc/llvm-project?rev=266926&view=rev > Log: > unwind: unify the definition of _LIBUNWIND_S

Re: [libunwind] r266926 - unwind: unify the definition of _LIBUNWIND_SUPPORT_FRAME_APIS

2016-04-20 Thread Richard Smith via cfe-commits
On Wed, Apr 20, 2016 at 3:31 PM, Richard Smith wrote: > On Wed, Apr 20, 2016 at 3:18 PM, Saleem Abdulrasool via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: compnerd >> Date: Wed Apr 20 17:18:47 2016 >> New Revision: 266926 >> >>

<    29   30   31   32   33   34   35   36   37   38   >