[PATCH] D30977: [CodeGen] Emit a CoreFoundation link guard when @available is used

2017-03-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. After r297760, __isOSVersionAtLeast in compiler-rt loads the CoreFoundation symbols at runtime. This means that `@available` will always fail when used in a binary without a linked CoreFoundation. This patch forces Clang to emit a reference to a CoreFoundation sy

[PATCH] D30977: [CodeGen] Emit a CoreFoundation link guard when @available is used

2017-03-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/CodeGen/CGObjC.cpp:3435 + CheckFTy, "__clang_at_available_requires_core_foundation_framework")); + CFLinkCheckFunc->setLinkage(llvm::GlobalValue::LinkOnceAnyLinkage); + CodeGenFunction CGF(*this); rjmccall wr

[PATCH] D30977: [CodeGen] Emit a CoreFoundation link guard when @available is used

2017-03-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 91977. arphaman marked an inline comment as done. arphaman added a comment. The guard function is now `hidden`. I also adopted linker options as John suggested. Repository: rL LLVM https://reviews.llvm.org/D30977 Files: lib/CodeGen/CGObjC.cpp lib/C

[PATCH] D31005: [Objective-C] Fix "repeated use of weak" warning with -fobjc-weak

2017-03-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaDecl.cpp:10184 + (!getLangOpts().ObjCAutoRefCount && getLangOpts().ObjCWeak && + VDecl->getType().getObjCLifetime() != Qualifiers::OCL_Weak)) && !Diags.isIgnored(diag::warn_arc_repeated_use_of_weak

[PATCH] D30977: [CodeGen] Emit a CoreFoundation link guard when @available is used

2017-03-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/CodeGen/CGObjC.cpp:3428 + // CoreFoundation is not used in the code, the linker won't link the + // framework. + auto &Context = getLLVMContext(); rjmccall wrote: > Can you explain why compiler-rt has to load the

[PATCH] D30977: [CodeGen] Emit a CoreFoundation link guard when @available is used

2017-03-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 92028. arphaman marked an inline comment as done. arphaman added a comment. Reverse the early exit checks. Repository: rL LLVM https://reviews.llvm.org/D30977 Files: lib/CodeGen/CGObjC.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h

[PATCH] D31134: [Serialization] Serialize DependentSizedExtVectorType

2017-03-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. DependentSizedExtVectorType should be supported by the serialization library Repository: rL LLVM https://reviews.llvm.org/D31134 Files: include/clang/Serialization/ASTBitCodes.h lib/Serialization/ASTReader.cpp lib/Serialization/ASTWriter.cpp test/PCH/c

[PATCH] D31177: [ARC][ObjC++] Use ObjC semantic rules for comparisons between a pointer and objective-c object pointer

2017-03-21 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. When ARC is enabled in Objective-C++, comparisons between a pointer and Objective-C object pointer typically result in errors like this: `invalid operands to a binary expression`. This error message can be quite confusing as it doesn't provide a solution to the p

[PATCH] D30009: Add support for '#pragma clang attribute'

2017-03-21 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D30009#705699, @aaron.ballman wrote: > In https://reviews.llvm.org/D30009#705649, @efriedma wrote: > > > Looking over the most recent version, I'm happy with the general semantics > > of push with apply_only_to. I'm not sure I see the point

[PATCH] D31179: Objective-C categ

2017-03-21 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Repository: rL LLVM https://reviews.llvm.org/D31179 Files: include/clang/Basic/DiagnosticParseKinds.td include/clang/Sema/Sema.h lib/Parse/ParseObjc.cpp lib/Sema/SemaDeclObjC.cpp test/SemaObjC/attr-deprecated.m test/SemaObjC/category-attribute.m te

[PATCH] D31179: Objective-C categories should support attributes

2017-03-21 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Sorry about an empty body, I had a keyboard malfunction. I have updated the patch now. Repository: rL LLVM https://reviews.llvm.org/D31179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D31187: Fix removal of out-of-line definitions.

2017-03-21 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Is it possible to test this change? https://reviews.llvm.org/D31187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30009: Add support for '#pragma clang attribute'

2017-03-21 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D30009#706515, @aaron.ballman wrote: > In https://reviews.llvm.org/D30009#706171, @arphaman wrote: > > > I would be ok with that. We could merge `apply_to` and `apply_only_to` into > > a single `apply_to` matching rule set specifier (it would

[PATCH] D31179: Objective-C categories should support attributes

2017-03-21 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: test/SemaObjC/attr-deprecated.m:124-128 +@interface A(Blah) // no warning +- (A*)getA; @end +@implementation A(Blah) // no warning aaron.ballman wrote: > I would have assumed the use in the `@implementation` would ha

[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-03-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Please update the patch to include the full context (`git diff -U99`). Repository: rL LLVM https://reviews.llvm.org/D31235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D31134: [Serialization] Serialize DependentSizedExtVectorType

2017-03-22 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL298493: [Serialization] Serialize DependentSizedExtVectorType (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D31134?vs=92335&id=92613#toc Repository: rL LLVM https://revie

[PATCH] D31241: [Modules][PCH] Serialize #pragma pack

2017-03-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This patch serializes the state of `#pragma pack`. It preserves the state of the pragma from a PCH/from modules in a file that uses that PCH/those modules. Repository: rL LLVM https://reviews.llvm.org/D31241 Files: include/clang/Serialization/ASTBitCodes.h

[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-03-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaDecl.cpp:6753 // the constructor initializes the field with the parameter. -if (isa(NewDC) && isa(D)) { - // Remember that this was shadowed so we can either warn about its - // modification or its existe

[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-03-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaDecl.cpp:5547 + if (ShadowedDecl && !Redeclaration) { +CheckShadow(NewTD, ShadowedDecl, Previous); You don't need to use `{}` braces here. Comment at: lib/Sema/SemaDecl.cpp:6753

[PATCH] D30977: [CodeGen] Emit a CoreFoundation link guard when @available is used

2017-03-23 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL298588: [CodeGen] Emit a CoreFoundation link guard when @available is used (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D30977?vs=92028&id=92780#toc Repository: rL LLVM

[PATCH] D31179: Objective-C categories should support attributes

2017-03-23 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL298589: Support attributes for Objective-C categories (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D31179?vs=92454&id=92782#toc Repository: rL LLVM https://reviews.llvm.

[PATCH] D31177: [ARC][ObjC++] Use ObjC semantic rules for comparisons between a pointer and objective-c object pointer

2017-03-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaExpr.cpp:9431 + ? 2 + : 1)) { if (convertPointersToCompositeType(*this, Loc, LHS, RHS)) ahatanak wrote: > It wasn't clear to me why the code has to be added to the right hand

[PATCH] D31177: [ARC][ObjC++] Use ObjC semantic rules for comparisons between a pointer and objective-c object pointer

2017-03-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 92783. arphaman marked an inline comment as done. arphaman added a comment. The condition in the if is now more clear. Repository: rL LLVM https://reviews.llvm.org/D31177 Files: lib/Sema/SemaExpr.cpp test/SemaObjCXX/arc-ptr-comparison.mm Index: te

[PATCH] D30009: Add support for '#pragma clang attribute'

2017-03-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: docs/LanguageExtensions.rst:2430 + +- ``function(is_method)``: Can be used to apply attributes to C++ methods, + including operators and constructors/destructors. aaron.ballman wrote: > Instead of `is_method`, I think

[PATCH] D31177: [ARC][ObjC++] Use ObjC semantic rules for comparisons between a pointer and objective-c object pointer

2017-03-30 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299080: [ARC][ObjC++] Use ObjC semantic rules for comparisons between a pointer and (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D31177?vs=92783&id=93475#toc Repository:

[PATCH] D31241: [Modules][PCH] Serialize #pragma pack

2017-03-31 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299226: [Modules][PCH] Serialize #pragma pack (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D31241?vs=92638&id=93650#toc Repository: rL LLVM https://reviews.llvm.org/D312

[PATCH] D31597: [ObjC++] Conversions from specialized to non-specialized objective-c object type should be preferred over conversions to other object pointers

2017-04-03 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Right now Clang will select incorrect overload when the Objective-C interface type is specialized, e.g.: void overload(Base *b); void overload(Derived *d); void test(Base b) { overload(b); // This will select (Derived *) overload } This patch ensures

[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-04-03 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks! I'll commit it for you right now. https://reviews.llvm.org/D31235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-04-03 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299363: Enhance -Wshadow to warn when shadowing typedefs or type aliases (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D31235?vs=93583&id=93878#toc Repository: rL LLVM ht

[PATCH] D29768: [TargetInfo] Set 'UseSignedCharForObjCBool' to false by default

2017-04-04 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Ping. Repository: rL LLVM https://reviews.llvm.org/D29768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31669: Fix lambda to block conversion in C++17 by avoiding copy elision for the lambda capture used by the created block

2017-04-04 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. The commit r288866 introduced guaranteed copy elision to C++ 17. This unfortunately broke the lambda to block conversion in C++17 (the compiler crashes when performing IRGen). This patch fixes the conversion by avoiding copy elision for the capture that captures

[PATCH] D31669: Fix lambda to block conversion in C++17 by avoiding copy elision for the lambda capture used by the created block

2017-04-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 94177. arphaman marked 2 inline comments as done. arphaman added a comment. Use a new EntityKind and improve test. Repository: rL LLVM https://reviews.llvm.org/D31669 Files: include/clang/Sema/Initialization.h lib/Sema/SemaInit.cpp lib/Sema/SemaLa

[PATCH] D30009: Add support for '#pragma clang attribute'

2017-04-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaAttr.cpp:578 +return; + Diag(PragmaAttributeStack.back().Loc, diag::warn_pragm_attribute_no_pop_eof); +} aaron.ballman wrote: > Perhaps adding a FixIt here would be a kindness? Where would the fix-it p

[PATCH] D15994: Allow for unfinished #if blocks in preambles.

2017-04-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks for working on this! I have some comments below: Comment at: include/clang/Lex/Preprocessor.h:291 + +void setState(State s) { ConditionalStackState = s; } + `setState` is redundant IMHO, just assign to `ConditionalStackState

[PATCH] D31652: [clang-format] Recognize Java logical shift assignment operator

2017-04-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Are the `<<<` and `>>>` operators handled correctly? Repository: rL LLVM https://reviews.llvm.org/D31652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31652: [clang-format] Recognize Java logical shift assignment operator

2017-04-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Basic/LangOptions.def:95 LANGOPT(ObjC2 , 1, 0, "Objective-C 2") +LANGOPT(Java , 1, 0, "Java") BENIGN_LANGOPT(ObjCDefaultSynthProperties , 1, 0, I don't think we should have a `Ja

[PATCH] D31669: Fix lambda to block conversion in C++17 by avoiding copy elision for the lambda capture used by the created block

2017-04-06 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299646: Fix lambda to block conversion in C++17 by avoiding copy elision for the (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D31669?vs=94177&id=94358#toc Repository: rL

[PATCH] D31597: [ObjC++] Conversions from specialized to non-specialized objective-c object type should be preferred over conversions to other object pointers

2017-04-06 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299648: [ObjC++] Conversions from specialized to non-specialized Objective-C generic (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D31597?vs=93845&id=94360#toc Repository:

[PATCH] D29877: Warn about unused static file scope function template declarations.

2017-04-11 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. The operators in PointerUnion seem useful. I don't think they should be removed even if they're not used in tree, since they might be used by some out-of-tree code. https://reviews.llvm.org/D29877 ___ cfe-commits mailing

[PATCH] D29877: Warn about unused static file scope function template declarations.

2017-04-11 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Ah, I see. I guess if `static` is removed the warning will go away. Thanks! https://reviews.llvm.org/D29877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26503: [Parser][ObjC] Improve diagnostics and recovery when C++ keywords are used as identifiers in Objective-C++

2017-04-11 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299950: [Parser][ObjC++] Improve diagnostics and recovery when C++ keywords are used (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D26503?vs=78218&id=94823#toc Repository:

[PATCH] D25321: Fix PR13910: Don't warn that __builtin_unreachable() is unreachable

2017-04-11 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299951: Fix PR13910: Don't warn that __builtin_unreachable() is unreachable (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D25321?vs=73898&id=94834#toc Repository: rL LLVM

[PATCH] D28670: [ObjC] Disallow vector parameters and return values in Objective-C methods on older X86 targets

2017-04-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Ping Repository: rL LLVM https://reviews.llvm.org/D28670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28670: [ObjC] Disallow vector parameters and return values in Objective-C methods on older X86 targets

2017-04-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 95099. arphaman marked an inline comment as done. arphaman added a comment. Add an assertion as requested by Bruno. Repository: rL LLVM https://reviews.llvm.org/D28670 Files: include/clang/AST/DeclBase.h include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D32010: [indexer] Record class template specializations using a new 'SpecializationOf' relationship

2017-04-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This patch extends the set of relationships that are recorded by the indexer by adding support for the 'SpecializationOf' relationship. Repository: rL LLVM https://reviews.llvm.org/D32010 Files: include/clang/Index/IndexSymbol.h lib/Index/IndexDecl.cpp

[PATCH] D32020: [indexer] The relationship between the declarations in template specializations that 'override' declarations in the base template should be recorded

2017-04-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This is useful for "go to definition" feature for an IDE like Xcode. Consider the following example: template struct Traits { using EncodedAs = void; // 1 }; template<> struct Traits { using EncodedAs = int; // 2 }; This change will allow

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This patch is based on the RFC that I've sent out earlier (http://lists.llvm.org/pipermail/cfe-dev/2017-April/053394.html). It teaches Clang's Lexer to recognize the editor placeholders that are produced by some editors like Xcode when expanding code-completion re

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 95297. arphaman added a comment. I've decided to treat each placeholder as an identifier token (like Swift) instead of just lexing the contents. This will prevent spurious errors for declaration name placeholders that have spaces or hyphens inside. Reposi

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D32081#727450, @benlangmuir wrote: > Rather than stick ranges into the diagnostic engine, I think it would be > cleaner to have the identifier have a method like `isEditorPlaceholder()` > that can be used to avoid situations like this in a p

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D32081#727511, @arphaman wrote: > In https://reviews.llvm.org/D32081#727450, @benlangmuir wrote: > > > Rather than stick ranges into the diagnostic engine, I think it would be > > cleaner to have the identifier have a method like `isEditorPla

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. It's more about handling all of the cases, e.g. the completion results for declaration patterns with placeholders, as those can't be caught with a check at an expression/typename level. I guess then I can catch all of the most common cases now and we can improve the s

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 95348. arphaman marked an inline comment as done. arphaman added a comment. - Don't use the diagnostic engine suppression ranges, but rely on changes to parser/sema for diagnostic suppression. - Rename the compiler flag to '-fallow-editor-placeholders'. Re

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 95349. arphaman added a comment. Check if `IdentifierInfo` is nil in `ActOnIdExpression` to prevent crash. Repository: rL LLVM https://reviews.llvm.org/D32081 Files: include/clang/Basic/DiagnosticLexKinds.td include/clang/Basic/IdentifierTable.h i

[PATCH] D32144: [Coverage] Don't emit mappings for functions in dependent contexts (fixes PR32679)

2017-04-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. I agree with Adam, the old check is now redundant. LGTM after removing it. Comment at: test/CoverageMapping/pr32679.cpp:2 +// RUN: %clang_cc1 -cc1 -triple i686-pc-window

[PATCH] D31739: Add markup for libc++ dylib availability

2017-04-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/__config:1160 + +#endif // _LIBCPP_CONFIG Redundant whitespace added? Comment at: utils/libcxx/test/config.py:358 +def add_deployement_feature(self, feature): +(arch, name, vers

[PATCH] D32176: Add #pragma clang attribute support for the external_source_symbol attribute

2017-04-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Right now the `external_source_symbol` attribute isn't supported by `#pragma clang attribute` for the following two reasons: - The `Named` attribute subject isn't supported by TableGen. - There was no way to specify a subject match rule for `#pragma clang attribu

[PATCH] D32176: Add #pragma clang attribute support for the external_source_symbol attribute

2017-04-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 95593. arphaman added a comment. Avoid a vector copy by using a reference variable. Repository: rL LLVM https://reviews.llvm.org/D32176 Files: include/clang/Basic/Attr.td lib/Sema/SemaDeclAttr.cpp test/Misc/pragma-attribute-supported-attributes-li

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 95596. arphaman marked 2 inline comments as done. arphaman added a comment. Add comments and remove `-fno-allow-editor-placeholders` from CC1 options. Repository: rL LLVM https://reviews.llvm.org/D32081 Files: include/clang/Basic/DiagnosticLexKinds.td

[PATCH] D32178: Delete unstable integration tests

2017-04-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks for working on this! We had some more discussion about these tests yesterday, and we would prefer to keep them actually. We might want to use something like `REQUIRES` instead, but right now we are still not sure what to check for. https://reviews.llvm.org/D32

[PATCH] D28231: -Wunreachable-code: Avoid multiple diagnostics that are triggered by the same source range and fix the unary operator fixit source range

2017-01-12 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291757: Avoid multiple -Wunreachable-code diagnostics that are triggered by (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D28231?vs=83819&id=84094#toc Repository: rL LLVM

[PATCH] D28670: [ObjC] Disallow vector parameters and return values in Objective-C methods on older X86 targets

2017-01-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: gparker42, mehdi_amini, erik.pilkington. arphaman added a subscriber: cfe-commits. arphaman set the repository for this revision to rL LLVM. This patch adds a new error that disallows methods that have parameters/return values with a vecto

[PATCH] D28467: [Sema] Add warning for unused lambda captures

2017-01-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. IMO, you can go ahead and commit a fix that removes the captures, and the fix can be reviewed post-commit. I don't think you should revert this patch as you'll have to remove the captures anyway before reinstating this patch, so might as well do it now. Repository:

[PATCH] D25817: [Sema] Improve the error diagnostic for dot destructor calls on pointer objects

2017-01-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Are there any other comments for this patch? I would like to commit it in the next couple of days, as it was accepted and I believe I addressed Richard's concerns. Thanks Repository: rL LLVM https://reviews.llvm.org/D25817 __

[PATCH] D28772: [Preprocessor] Fix incorrect token caching that occurs when lexing _Pragma in macro argument pre-expansion mode when skipping a function body

2017-01-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: bruno, rsmith, akyrtzi. arphaman added a subscriber: cfe-commits. arphaman set the repository for this revision to rL LLVM. Herald added a subscriber: nemanjai. This patch fixes a token caching problem that currently occurs when clang is s

[PATCH] D28670: [ObjC] Disallow vector parameters and return values in Objective-C methods on older X86 targets

2017-01-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaDeclObjC.cpp:4337 + VersionTuple MethodVersion = Method->getVersionIntroduced(); + if (SemaRef.getASTContext().getTargetInfo().getPlatformMinVersion() >= + AcceptedInVersion && erik.pilkington wr

[PATCH] D28670: [ObjC] Disallow vector parameters and return values in Objective-C methods on older X86 targets

2017-01-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 84564. arphaman marked an inline comment as done. arphaman added a comment. Use better diagnostic message as suggested by Erik Repository: rL LLVM https://reviews.llvm.org/D28670 Files: include/clang/AST/DeclBase.h include/clang/Basic/DiagnosticSema

[PATCH] D28705: [Sema] Fix bug in handling of designated initializer

2017-01-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D28705 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D28349: [Frontend] The macro that describes the Objective-C bool type should be defined in C as well

2017-01-17 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Ping. Repository: rL LLVM https://reviews.llvm.org/D28349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25213: Fix PR28181: Prevent operator overloading related assertion failure crash that happens in C only

2017-01-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Ping Repository: rL LLVM https://reviews.llvm.org/D25213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28514: [CodeCompletion] Reset the hidden declaration obtained after lookup when caching UsingShadowDecls

2017-01-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 84842. arphaman marked an inline comment as done. arphaman added a comment. Avoid the hidden declaration in `VisibleDeclsRecord::checkHidden` instead of the decl consumer in code-completion Repository: rL LLVM https://reviews.llvm.org/D28514 Files: l

[PATCH] D28514: [CodeCompletion] Reset the hidden declaration obtained after lookup when caching UsingShadowDecls

2017-01-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:961 +// then incorrectly applied to the target declaration. This can be avoided +// by resetting the declaration that's being hidden. +if (Hiding && isa(Hiding)) ahatanak wrote:

[PATCH] D27257: [CodeCompletion] Ensure that ObjC root class completes instance methods from protocols and categories as well

2017-01-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. ping Repository: rL LLVM https://reviews.llvm.org/D27257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25213: Fix PR28181: Prevent operator overloading related assertion failure crash that happens in C only

2017-01-19 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. arphaman marked an inline comment as done. Closed by commit rL292497: [Sema] Fix PR28181 by avoiding calling BuildOverloadedBinOp in C mode (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D25213?

[PATCH] D25817: [Sema] Improve the error diagnostic for dot destructor calls on pointer objects

2017-01-20 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL292615: [Sema] Improve the error diagnostic for dot destructor calls on pointer objects (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D25817?vs=75712&id=85135#toc Repository

[PATCH] D28349: [Frontend] The macro that describes the Objective-C bool type should be defined in C as well

2017-01-20 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL292617: [Frontend] The macro that describes the Objective-C bool type should (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D28349?vs=83354&id=85143#toc Repository: rL LLVM

[PATCH] D28514: [CodeCompletion] Reset the hidden declaration obtained after lookup when caching UsingShadowDecls

2017-01-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaLookup.cpp:3433 + // is not hidden by the using declaration. + if (isa(ND) && isa(D)) +continue; ahatanak wrote: > Do we have to check that ND's UsingDecl is equal to D? Or we don't have t

[PATCH] D28514: [CodeCompletion] Reset the hidden declaration obtained after lookup when caching UsingShadowDecls

2017-01-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D28514#651675, @ahatanak wrote: > This is not invalid: > > namespace Foo { > class C { }; > } > namespace Bar { class C { }; } > > void foo1() { > using Foo::C; > { > using Bar::C; > } > } > I see, that could happen

[PATCH] D28514: [CodeCompletion] Reset the hidden declaration obtained after lookup when caching UsingShadowDecls

2017-01-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 85151. arphaman added a comment. Ensure that the UsingShadowDecl and UsingDecl are in the same DeclContext. Repository: rL LLVM https://reviews.llvm.org/D28514 Files: lib/Sema/SemaLookup.cpp test/Index/complete-cached-globals.cpp Index: test/Index

[PATCH] D28514: [CodeCompletion] Reset the hidden declaration obtained after lookup when caching UsingShadowDecls

2017-01-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 85398. arphaman added a comment. Verify that the using shadow decl can be hidden by its owning using decl. Repository: rL LLVM https://reviews.llvm.org/D28514 Files: lib/Sema/SemaLookup.cpp test/Index/complete-cached-globals.cpp Index: test/Index/

[PATCH] D28514: [CodeCompletion] Reset the hidden declaration obtained after lookup when caching UsingShadowDecls

2017-01-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D28514#651724, @ahatanak wrote: > If they are equal, the loop can continue because a UsingDecl doesn't hide a > UsingShadowDecl that is tied to it. You're right, that would be better, I didn't notice that method before. Repository: rL L

[PATCH] D27257: [CodeCompletion] Ensure that ObjC root class completes instance methods from protocols and categories as well

2017-01-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done. arphaman added a comment. In https://reviews.llvm.org/D27257#652135, @bruno wrote: > How does this interact (if at all) with classes annotated with > `__attribute__((objc_root_class))`? The root classes are just classes without a superclass, the attr

[PATCH] D27257: [CodeCompletion] Ensure that ObjC root class completes instance methods from protocols and categories as well

2017-01-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 85400. arphaman added a comment. Add comment to parameter Repository: rL LLVM https://reviews.llvm.org/D27257 Files: lib/Sema/SemaCodeComplete.cpp test/Index/complete-objc-message.m Index: test/Index/complete-objc-message.m

[PATCH] D28514: [CodeCompletion] Reset the hidden declaration obtained after lookup when caching UsingShadowDecls

2017-01-23 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL292805: [Sema] UsingShadowDecl shouldn't be hidden by the UsingDecl that owns it (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D28514?vs=85398&id=85414#toc Repository: rL

[PATCH] D27257: [CodeCompletion] Ensure that ObjC root class completes instance methods from protocols and categories as well

2017-01-24 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL292932: [CodeCompletion] Ensure that ObjC root class completes instance (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D27257?vs=85400&id=85578#toc Repository: rL LLVM htt

[PATCH] D29451: Add a prototype for clangd v0.1

2017-02-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. This might be a bad question, but is there any particular reason why you didn't use the YAML Traits API for parsing instead of the raw YAML Stream API? In my experience the traits based API is quite convenient for structured data like various options and parameters in

[PATCH] D29530: [ubsan] Reduce null checking of C++ object pointers (PR27581)

2017-02-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. I feel like you should have at least one statement in the test that uses explicit 'this' to access a field/method. Does your patch handle fields/methods in base classes as well? I think 'this' might be implicitly converted in the base of the member expression. Also, w

[PATCH] D29530: [ubsan] Reduce null checking of C++ object pointers (PR27581)

2017-02-09 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks! I guess for the sake of completeness it might be useful for handle 'this' in parens as well, since it could up in macros: #define MEMBER(x) (x)->y ... MEMBER(this) ... Btw, I was curious if we could do a similar optimization in Objective-C, but 'self'

[PATCH] D29530: [ubsan] Reduce null checking of C++ object pointers (PR27581)

2017-02-09 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Btw, you mentioned that 'this' must have been null-checked before the method is called. But what if it's called from some part of code that was compiled without `-fsanitize=null`? Wouldn't we still want at least one check to see if 'this' is null in a method? https:/

[PATCH] D28772: [Preprocessor] Fix incorrect token caching that occurs when lexing _Pragma in macro argument pre-expansion mode when skipping a function body

2017-02-09 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 87801. arphaman added a comment. Sorry about the delay. As per Richard's suggestion, the updated patch now makes the `_Pragma` parser responsible for initiating the removal of cached tokens. Repository: rL LLVM https://reviews.llvm.org/D28772 Files:

[PATCH] D29768: [TargetInfo] Set 'UseSignedCharForObjCBool' to false by default

2017-02-09 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. The target-specific flag 'UseSignedCharForObjCBool' is used to determine the type for the Objective-C BOOL type. We should set it to `false` by default so that new targets can avoid setting it to `true`. Repository: rL LLVM https://reviews.llvm.org/D29768 Fi

[PATCH] D28286: [CodeCompletion] Code complete the missing C++11 keywords

2017-02-09 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Ping. Repository: rL LLVM https://reviews.llvm.org/D28286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32439: Fix for incorrect source position of dependent c'tor initializer (bug:26195)

2017-06-27 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks! I'll recommit today. https://reviews.llvm.org/D32439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32439: Fix for incorrect source position of dependent c'tor initializer (bug:26195)

2017-06-27 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Recommitted in r306392. https://reviews.llvm.org/D32439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34329: [clang-diff] Initial implementation.

2017-06-27 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Just to clarify: I'm fine with adding the Comment at: include/clang/Tooling/ASTDiff/ASTDiff.h:32 +public: + ASTDiff(SyntaxTree &T1, SyntaxTree &T2, ComparisonOptions *Options); + Can you pass-in the options by value instead of a point

[PATCH] D34329: [clang-diff] Initial implementation.

2017-06-27 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Ignore the "Just to clarify: I'm fine with adding the" comment, it was from last week that was saved in my session and that I didn't delete. https://reviews.llvm.org/D34329 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D34329: [clang-diff] Initial implementation.

2017-06-27 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Tooling/ASTDiff/ASTDiff.h:57 + SyntaxTree(T *Node, const ASTContext &AST) + : TreeImpl(llvm::make_unique(this, Node, AST)) {} + If you want to use two different names then something like `SyntaxTreeI

[PATCH] D34687: [Tooling] CompilationDatabase should be able to strip position arguments when `-fsyntax-only` is used

2017-06-27 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Right now, Clang fails to create a fixed compilation database when the compilation arguments use `-fsyntax-only` instead of `-c`. The reported error is: "warning: no compile jobs found". This happens because we don't look at the compilation job when stripping the

[PATCH] D34696: [refactor] Move the core of clang-rename to lib/Tooling/Refactoring

2017-06-27 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Herald added a subscriber: mgorny. The core engine of clang-rename will be used for local and global renames in the new refactoring engine (http://lists.llvm.org/pipermail/cfe-dev/2017-June/054286.html). I haven't renamed the files/cleaned up the code in this pat

[PATCH] D33816: [Sema][ObjC] Don't allow -Wunguarded-availability to be silenced with redeclarations

2017-06-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM. One last comment below: Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2880 InGroup; def note_partial_availability_silence : Note< + "annotate %0 with

[PATCH] D34696: [refactor] Move the core of clang-rename to lib/Tooling/Refactoring

2017-06-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D34696#793613, @klimek wrote: > The main thing I'm concerned about is having the main code in core, but > having all tests in tools-extra. I think if we go that route we should also > move clang-rename and its tests to core. Thoughts? Woul

<    7   8   9   10   11   12   13   14   15   >