[PATCH] D74355: [ubsan] Null-check and adjust TypeLoc before using it

2020-02-10 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74355/new/ https://reviews.llvm.org/D74355 ___ cfe-commits mailing

[PATCH] D74417: [clang][ARC] Remove invalid assertion that can crash clangd

2020-02-12 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. This looks good, but please add a testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74417/new/ https://reviews.llvm.org/D74417 ___ cfe-commits mailing list cfe-co

[PATCH] D73755: [objc_direct] Small updates to help with adoption.

2020-02-12 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:1005-1006 def err_objc_direct_duplicate_decl : Error< - "%select{|direct }0method declaration conflicts " - "with previous %select{|direct }1declaration of method %2">; + "%sel

[PATCH] D74417: [clang][ARC] Remove invalid assertion that can crash clangd

2020-02-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In D74417#1874747 , @dgoldman wrote: > Added but it's still failing due to a different assertion failure, do you > think this could be because the abbreviation is different for the ParamVars? > I'm not sure how to handle

[PATCH] D73755: [objc_direct] Small updates to help with adoption.

2020-02-14 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM, thanks. Comment at: clang/lib/Sema/SemaObjCProperty.cpp:2436 + if (!GetterMethod) { +if (const ObjCCategoryDecl *CatDecl = dyn_cast(CD)) { +

[PATCH] D71566: New checks for fortified sprintf

2020-01-16 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added reviewers: aaron.ballman, rsmith. erik.pilkington added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:422 + size_t StrLen = + std::min(std::max(TypeSize, size_t(1)) - 1, FormatStrRef.size()); + if (!analyze_format_string::Pa

[PATCH] D44589: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots.

2018-03-21 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi Volodymyr, thanks for working on this! Overall this looks good, I just have a few nits. Comment at: clang/include/clang/Basic/SourceLocation.h:202 +/// Can be used transparently in places where SourceLocation is expected. +class MultiSourceL

[PATCH] D44589: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots.

2018-03-26 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM, this is a really nice feature! Comment at: clang/include/clang/Basic/SourceLocation.h:202 +/// Can be used transparently in places where SourceLocatio

[PATCH] D45194: [Sema] Defer checking constexpr lambda until after we've finished the lambda class.

2018-04-02 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rsmith, faisalv. Previously, this caused ExprConstant to assert while verifying the lambda is constexpr: void f() { int x = 0; [=]() constexpr { return x; }; } The problem is that ActOnFinish

[PATCH] D45194: [Sema] Defer checking constexpr lambda until after we've finished the lambda class.

2018-04-04 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 141001. erik.pilkington marked an inline comment as done. erik.pilkington added a comment. Handle this in ExprConstant instead of in Sema. https://reviews.llvm.org/D45194 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/cxx1z-constexpr-l

[PATCH] D45194: [Sema] Defer checking constexpr lambda until after we've finished the lambda class.

2018-04-04 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:12886 if (!IsInstantiation && FD && FD->isConstexpr() && !FD->isInvalidDecl() && +!isLambdaCallOperator(FD) && (!CheckConstexprFunctionDecl(FD) || faisalv wrote:

[PATCH] D45194: [Sema] Defer checking constexpr lambda until after we've finished the lambda class.

2018-04-04 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 141042. erik.pilkington marked an inline comment as done. erik.pilkington added a comment. Add refersToEnclosingVariableOrCaptureCheck(), comments. https://reviews.llvm.org/D45194 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/cxx1z-co

[PATCH] D45194: [Sema] Defer checking constexpr lambda until after we've finished the lambda class.

2018-04-04 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:4312 + } else if (MD && isLambdaCallOperator(MD) + && !Info.checkingPotentialConstantExpression()) { // We're in a lambda; determine the lambda capture field maps.

[PATCH] D45194: [Sema] Defer checking constexpr lambda until after we've finished the lambda class.

2018-04-04 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. > LGTM - can you commit? Yep, I'll do that now. Thanks for reviewing! Comment at: clang/lib/AST/ExprConstant.cpp:5212 + cast(E)->refersToEnclosingVariableOrCapture()) { +// We don't track the lambda's captures in a potential constant e

[PATCH] D45451: [ItaniumMangle] Undeduced auto type doesn't belong in the substitution table

2018-04-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rsmith, majnemer, rjmccall. Since "Da" and "Dc" (auto and decltype(auto)) are under in the mangling grammer, they shouldn't have a substitution (https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling-compression). I b

[PATCH] D39913: [ObjC] warn about availability attributes missing from a method's declaration when they're specified for a method's definition

2017-11-10 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Any thoughts on having this for regular functions and C++ member functions? Seems just as useful there. Comment at: include/clang/Sema/Sema.h:2406 + /// This will warn on any missing clauses in the declaration. + void checkMissingAvailability

[PATCH] D39913: [ObjC] warn about availability attributes missing from a method's declaration when they're specified for a method's definition

2017-11-17 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. > It's harder as we don't know the distinction between declaration/definition > at merge time. Right now the C++ implementation of this warning actually > checks the attribut

[PATCH] D40279: [libcxxabi][demangler] Add demangling for __attribute__((abi_tag))

2017-11-20 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. This patch adds demangling support for `__attribute__((abi_tag))`. I.e, the following function: `__attribute__((abi_tag("foo"))) void f() {}` mangles to `_Z1fB3foov`, and now demangles to `f[abi:foo]()` (this syntax is the same as GCC's demangler). This pa

[PATCH] D40279: [libcxxabi][demangler] Add demangling for __attribute__((abi_tag))

2017-11-21 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 123787. erik.pilkington added a comment. In this new patch: - Update the comment BNF to show the new attribute, fix comment formatting - Move call to parse_abi_tag_seq() from parse_unqualified_name() to parse_operator_name() to more closely model BNF

[PATCH] D40279: [libcxxabi][demangler] Add demangling for __attribute__((abi_tag))

2017-11-21 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington marked 5 inline comments as done. erik.pilkington added inline comments. Comment at: src/cxa_demangle.cpp:10 +// FIXME: (possibly) incomplete list of features that clang mangles that this +// file does not yet support: EricWF wrote: > Awesome co

[PATCH] D27827: [ObjC] CodeGen support for @available on macOS

2016-12-15 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: manmanren, dexonsmith, rjmccall, thakis. erik.pilkington added a subscriber: cfe-commits. This patch adds CodeGen support for `@available` on macos. This is done by compiling @available predicates into calls to `clang.is_os_v

[PATCH] D27827: [ObjC] CodeGen support for @available on macOS

2016-12-16 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. I seem to remember that mapping from kernel versions to marketing versions was tossed around as a potential alternative to Gestalt. I think that the problem was Apple sometimes introduces (or reserves the right to introduce) new SDKs in a patch release (ie, Z in

[PATCH] D24639: [Sema] Warn when returning a lambda that captures a local variable by reference

2016-12-20 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! https://reviews.llvm.org/D24639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26893: [Sema] Fix assert on valid during template argument deduction

2017-01-04 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington abandoned this revision. erik.pilkington added a comment. @rsmith fixed this in r291064. https://reviews.llvm.org/D26893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[PATCH] D30837: [libcxx] Support for shared_ptr

2017-03-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! https://reviews.llvm.org/D30837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30837: [libcxx] Support for shared_ptr

2017-03-30 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 93488. erik.pilkington marked 2 inline comments as done. erik.pilkington added a comment. In this new patch, use an explicit specialization of std::allocator that specifically only performs a rebind. This needs to be a specialization of std::allocato

[PATCH] D30837: [libcxx] Support for shared_ptr

2017-04-11 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! https://reviews.llvm.org/D30837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30837: [libcxx] Support for shared_ptr

2017-04-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 95210. erik.pilkington added a comment. This new patch includes @EricWF's static_assert & test. Thanks, Erik https://reviews.llvm.org/D30837 Files: include/memory test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_def

[PATCH] D30837: [libcxx] Support for shared_ptr

2017-04-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: include/memory:3606 +template <> +class _LIBCPP_TEMPLATE_VIS allocator<__shared_ptr_dummy_rebind_allocator_type> +{ EricWF wrote: > I would prefer using an entirely different allocator type, not a > specializati

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

2017-01-14 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi Alex, thanks for CCing me! Comment at: include/clang/Basic/DiagnosticSemaKinds.td:1157 +def err_objc_method_unsupported_param_ret_type : Error< + "%0 %select{parameter|return value}1 is unsupported for this target">; + s/ret

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

2017-06-28 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 104437. erik.pilkington added a comment. Improve diagnostics for unnamed types. https://reviews.llvm.org/D33816 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/DelayedDiagnostic.h include/clang/Sema/Sema.h lib/Sema/Delay

[PATCH] D35061: [ObjC] Avoid the -Wunguarded-availability warnings for protocol requirements in protocol/class/category declarations

2017-07-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: lib/Sema/SemaExpr.cpp:142 if (Result == AR_NotYetIntroduced) { +if (AvoidAvailabilityChecks) + return; Why are we doing this just for partials? Doesn't this also apply to unavailable/deprecated? Re

[PATCH] D35061: [ObjC] Avoid the -Wunguarded-availability warnings for protocol requirements in protocol/class/category declarations

2017-07-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: lib/Sema/SemaExpr.cpp:142 if (Result == AR_NotYetIntroduced) { +if (AvoidAvailabilityChecks) + return; arphaman wrote: > erik.pilkington wrote: > > Why are we doing this just for partials? Doesn't thi

[PATCH] D35061: [ObjC] Avoid the -Wunguarded-availability warnings for protocol requirements in protocol/class/category declarations

2017-07-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: lib/Sema/SemaExpr.cpp:132 + bool ObjCPropertyAccess, + bool AvoidAvailabilityC

[PATCH] D35158: [libcxxabi][demangler] NFC: Don't make everything a template

2017-07-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. Herald added a reviewer: EricWF. This is a NFC patch to not make every parse_* function templated on Db, which makes it easier to use methods on Db because it isn't dependent anymore. This is a prerequisite to using an AST to demangle, as per this thread:

[PATCH] D35159: [libcxxabi][demangler] Use an AST to represent the demangled name

2017-07-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington marked 4 inline comments as done. erik.pilkington added inline comments. Comment at: src/cxa_demangle.cpp:44 +class string_ref +{ mehdi_amini wrote: > If this is supposed to be *the* ultimate LLVM demangler, can we follow LLVM > coding standard

[PATCH] D35158: [libcxxabi][demangler] NFC: Don't make everything a template

2017-07-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington closed this revision. erik.pilkington added a comment. Landed as r307482 & r307481, thanks! (for some reason phab wasn't automatically closing this) https://reviews.llvm.org/D35158 ___ cfe-commits mailing list cfe-commits@lists.llvm

[PATCH] D35159: [libcxxabi][demangler] Use an AST to represent the demangled name

2017-07-12 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. > Looks like this demangler's design is similar to my demangler for Microsoft > name mangling scheme (https://reviews.llvm.org/D34667). Is that a > coincidence? Both demanglers create AST, stringize it using > print_left/print_right (I named them write_pre/write

[PATCH] D35379: Add documentation for @available

2017-07-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a reviewer: arphaman. erik.pilkington added a subscriber: arphaman. erik.pilkington added a comment. This looks great, thanks for working on this! LGTM, but @arphaman might have some thoughts. Comment at: docs/LanguageExtensions.rst:1290 -.. _langext-ov

[PATCH] D35379: Add documentation for @available

2017-07-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: docs/LanguageExtensions.rst:1309 + void my_fun(NSSomeClass* var) { +if (@available(macOS 10.12)) { + [var fancyNewMethod]; thakis wrote: > erik.pilkington wrote: > > Don't forget the '*', ie @available(

[PATCH] D35726: unguarded availability: add a fixit for the "annotate '...' with an availability attribute to silence" note

2017-07-21 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Thanks for working on this! This looks like it would be very useful. Comment at: lib/Sema/SemaDeclAttr.cpp:7230 +return; + for (const auto &M : S.getPreprocessor().macros()) { +if (M.first->getName() != "API_AVAILABLE")

[PATCH] D35781: [Sema] Make sure that -Wunguarded-availability emits notes at the right redeclaration

2017-07-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. This is done by modifying ShouldDiagnoseAvailabilityOfDecl() so that the OffendingDecl is the one with the original availability attribute. Also, keep track of this availability attribute so we don't have to constantly recompute it via getAttrForPlatform()

[PATCH] D35781: [Sema] Make sure that -Wunguarded-availability emits notes at the right redeclaration

2017-07-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington planned changes to this revision. erik.pilkington added a comment. On second thought, I think it makes more sense to do this right before we emit a diagnostic so we have the most recent redecl with all the inherited availability attributes until then. I'll put a diff up for that

[PATCH] D35726: unguarded availability: add a fixit for the "annotate '...' with an availability attribute to silence" note

2017-07-24 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM, thanks for working on this! Comment at: lib/Sema/SemaDeclAttr.cpp:7230 +return; + for (const auto &M : S.getPreprocessor().macros()) { +

[PATCH] D41885: [libcxxabi][demangler] Improve handling of variadic templates

2018-01-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! Repository: rCXXA libc++abi https://reviews.llvm.org/D41885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41885: [libcxxabi][demangler] Improve handling of variadic templates

2018-01-25 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 131535. erik.pilkington marked 2 inline comments as done. erik.pilkington added a comment. In this new patch: - Make the cached values use a 3-way bool type, and default it to false. This simplifies all the Node ctors. - Remove some minor style fixes

[PATCH] D41885: [libcxxabi][demangler] Improve handling of variadic templates

2018-01-25 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: src/cxa_demangle.cpp:260-261 + +#if 0 + void dump() const { +char *Buffer = static_cast(std::malloc(1024)); dexonsmith wrote: > Why is this behind `#if 0`? Should you just use something like > `LLVM_DUMP_M

[PATCH] D41887: [libcxxabi][demangler] Clean up and llvm-ify the expression parser

2018-01-31 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 132279. erik.pilkington added a comment. Rebase onto r323906. Most of this patch is just a mechanical transformation to the parser to use the new API, the interesting part is just the changes to the Db struct. https://reviews.llvm.org/D41887 Files

[PATCH] D42776: [Sema] Fix an assertion failure in constant expression evaluation of calls to functions with default arguments

2018-02-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi Akira, thanks for working on this! Comment at: lib/AST/ExprConstant.cpp:1165-1173 + auto LB = Temporaries.lower_bound(Key); + + // If an element with key Key is found, reset the value and return it. This + // can happen if Key is part of a

[PATCH] D41889: [libcxxabi][demangler] Clean up and llvm-ify the type parser

2018-02-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 132747. erik.pilkington added a comment. Rebase and remove the qualifier substitution bug fix. https://reviews.llvm.org/D41889 Files: src/cxa_demangle.cpp Index: src/cxa_demangle.cpp ===

[PATCH] D27827: [ObjC] CodeGen support for @available on macOS

2017-02-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 89067. erik.pilkington added a comment. This new patch just generates a call to the function `_IsOSVersionAtLeast` and branches on the result. `_IsOSVersionAtLeast` is going through review here: https://reviews.llvm.org/D30136. I decided to parse th

[PATCH] D27827: [ObjC] CodeGen support for @available on macOS

2017-02-21 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 89305. erik.pilkington added a comment. This new patch addresses all of Alex's comments: - Remove `ObjC` from function names - Rename `_IsOSVersionAtLeast` -> `__isOSVersionAtLeast` - Improve testcase https://reviews.llvm.org/D27827 Files: lib/Co

[PATCH] D27827: [ObjC] CodeGen support for @available on macOS

2017-02-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: test/CodeGenObjC/availability-check.m:16 + // CHECK: br i1 true + if (__builtin_available(ios 10, *)) +; arphaman wrote: > Shouldn't this be `br i1 false`, since we are building for macOS so we have > no i

[PATCH] D30837: [libcxx] Support for shared_ptr

2017-03-10 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. This patch adds support for `shared_ptr` types, so that the following works: void Func(); void Del(void (*)()) std::shared_ptr x(Func, Del); Where previously this would fail to compile. In PR27566, the use case described for this was a shared pointe

[PATCH] D30837: [libcxx] Support for shared_ptr

2017-03-10 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 91385. erik.pilkington added a comment. This new patch replaces the allocator from `allocator` to `allocator`, I didn't realize `allocator` was deprecated. Thanks, Erik https://reviews.llvm.org/D30837 Files: include/memory test/std/utilities/m

[PATCH] D30837: [libcxx] Support for shared_ptr

2017-03-14 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 91660. erik.pilkington added a comment. In this new patch: - We only select `allocator` when _Yp is a function type, fixing the ABI break @EricWF pointed out. - Only try to select a different allocator if we're using the `__shared_ptr_pointer` layou

[PATCH] D30837: [libcxx] Support for shared_ptr

2017-03-14 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In https://reviews.llvm.org/D30837#698305, @EricWF wrote: > We can't just use an arbitrary allocator type for a number of reasons: > > - You just changed the type of the control block. That's ABI breaking. Ah, I didn't think of that. This new patch only selects

[PATCH] D24639: [Sema] Warn when returning a lambda that captures a local variable by reference

2016-12-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! https://reviews.llvm.org/D24639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30837: [libcxx] Support for shared_ptr

2017-05-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 97313. erik.pilkington added a comment. Rebase n' ping! https://reviews.llvm.org/D30837 Files: include/memory test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp test/std/utilities/memory/ut

[PATCH] D32424: Add a fix-it for -Wunguarded-availability

2017-05-04 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi Alex, thanks for working on this! This looks right, but I have a couple of comments. Thanks, Erik Comment at: lib/Sema/SemaDeclAttr.cpp:7151 +Visitor.Scope = Scope; +Visitor.TraverseStmt(const_cast(Scope)); +return Visitor.LastMa

[PATCH] D32891: [Sema][ObjC++] Objective-C++ support for __is_base_of(B, D)

2017-05-04 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. This patch adds Objective-C interfaces support for the type trait `is_base_of`, so that `__is_base_of(NSString, NSMutableString)` is true. rdar://24308607 Thanks for taking a look! Erik https://reviews.llvm.org/D32891 Files: lib/Sema/SemaExprCXX.cpp

[PATCH] D32424: Add a fix-it for -Wunguarded-availability

2017-05-05 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rL LLVM https://reviews.llvm.org/D32424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D33000: Add support for pretty platform names to `@available`/`__builtin_available`

2017-05-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM, thanks for working on this! Repository: rL LLVM https://reviews.llvm.org/D33000 ___ cfe-commits mailing list cfe-commi

[PATCH] D30837: [libcxx] Support for shared_ptr

2017-05-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! @mclow.lists: Do you have any thoughts here? https://reviews.llvm.org/D30837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33049: [libcxx] Support for Objective-C++ tests

2017-05-10 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. This patch adds lit testing support for Objective-C++. I'm going to be working on improving Objective-C++ support in libc++ this summer, and it would be nice to write tests. I tested this patch on Ubuntu 16.04 with gcc 5.4, and it works fine (the .mm tests

[PATCH] D33250: [Sema][ObjC] Fix a bug where -Wunguarded-availability was emitted at the wrong location

2017-05-16 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. Previously, we used TypeLocs to find the correct SourceLocations to emit -Wunguarded-availability. Unfortunately, TypeLocs can't be trusted as they sometimes have an an empty SourceLocation component. This new patch maintains the enclosing SourceLocation t

[PATCH] D33250: [Sema][ObjC] Fix a bug where -Wunguarded-availability was emitted at the wrong location

2017-05-16 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 99235. erik.pilkington added a comment. Just noticed this can be simplified a bit, NFC compared to the last version of the diff. https://reviews.llvm.org/D33250 Files: lib/Sema/SemaDeclAttr.cpp test/SemaObjC/unguarded-availability.m Index: te

[PATCH] D33250: [Sema][ObjC] Fix a bug where -Wunguarded-availability was emitted at the wrong location

2017-05-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 99605. erik.pilkington added a comment. > Can we ignore the TypeLocs with invalid location and instead look at > ObjCPropertyRefExprs with a class receiver? Sure, good idea. This new patch does exactly that. Thanks, Erik https://reviews.llvm.org/D

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. Herald added a reviewer: EricWF. This patch fixes a bug in the demangler where a pack expansion template parameter substitution with more than one element in a lambda's parameter list resulted in either a misdemangle or a crash. I'll commit this change to

[PATCH] D33049: [libcxx] Support for Objective-C++ tests

2017-05-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 99628. erik.pilkington added a comment. In this new patch: - Add support for toggling -fobjc-arc, this is done by using file extensions, ie: `foo.arc.pass.mm` instead of `foo.pass.mm`. (Thanks @dexonsmith for the suggestion!) - Clean up/simplify thi

[PATCH] D33049: [libcxx] Support for Objective-C++ tests

2017-05-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 99633. erik.pilkington marked an inline comment as done. erik.pilkington added a comment. This new patch checks to make sure ARC is enabled in the tests, thanks for the suggestion! https://reviews.llvm.org/D33049 Files: test/libcxx/selftest/test.

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: src/cxa_demangle.cpp:3036 break; -if (db.names.size() < 2) +if (k1 <= k0) return first; compnerd wrote: > I'm not sure how

[PATCH] D30837: [libcxx] Support for shared_ptr

2017-05-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! https://reviews.llvm.org/D30837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33393: [PATCH] Libcxxabi Demangler PR32890

2017-05-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Could you please add more context lines in any future patches? Makes it easier to review! I think we fixed the same problem at the same time, I have https://reviews.llvm.org/D33368 that also fixes this! The reason that inserting into db.names.back() sometimes r

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 99930. erik.pilkington added a comment. In this new patch: - Add the testcase from https://reviews.llvm.org/D33393 - Add an assert() that k0 <= k1 - Use std::for_each instead of the for loop Thanks for taking a look, Erik https://reviews.llvm.org/D

[PATCH] D33393: [PATCH] Libcxxabi Demangler PR32890

2017-05-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. > You could append my test case as a quick-check. Sure, I added the test case here to my patch and it works. > So, I'll go ahead and abandon this revision? Guess so, sorry for the confusion here. https://reviews.llvm.org/D33393 _

[PATCH] D33450: Warn about uses of `@available` that can't suppress the -Wunguarded-availability warnings

2017-05-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2889 + "use if (%select{@available|__builtin_available}0) instead">, + InGroup>; Might be a bit more clear if you mention in words that @available can only be the s

[PATCH] D33393: [PATCH] Libcxxabi Demangler PR32890

2017-05-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. > but having a constant like this ("7") sounds wrong. Why not 6, or 8, or 42? 7 is correct here because we inserting into a specific point into a string that was inserted into db.names just above this (but out of context from the diff). The only problem is that

[PATCH] D55212: Handle alloc_size attribute on function pointers

2021-03-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. In D55212#2641301 , @aaron.ballman wrote: > I think folks will have a chance to react if we apply it to trunk now, but I > am wondering if anyone's had a chance to investigate usage

[PATCH] D91630: [Parse] Add parsing support for C++ attributes on using-declarations

2021-03-29 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 333862. erik.pilkington marked 4 inline comments as done. erik.pilkington added a comment. Address @aaron.ballman's review comments. Also, fix a bug where we failed to properly parse an inherited constructor declaration with a trailing attribute. CH

[PATCH] D90188: Add support for attribute 'using_if_exists'

2021-03-29 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 333873. erik.pilkington marked 4 inline comments as done. erik.pilkington added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90188/new/ https://reviews.llvm.org/D90188 Files: clang/include/clang/AST/De

[PATCH] D90188: Add support for attribute 'using_if_exists'

2021-03-29 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/test/SemaCXX/using-if-exists.cpp:11 + +using NotNS::x UIE; // expected-error{{use of undeclared identifier 'NotNS'}} +} // test_basic Quuxplusone wrote: > Do you also have a test for `using NS::NotNS::x UIE

[PATCH] D95845: [ObjC] Add a command line flag that disables recognition of objc_direct for testability

2021-03-30 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 334136. erik.pilkington added a comment. - Use the new marshaling infrastructure - Fix a few places in Sema where we manually checked for `ObjCDirectAttr` instead of using `isDirectMethod` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95845/

[PATCH] D99661: [SemaObjC] Fix a -Wbridge-cast false-positive

2021-03-31 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: arphaman, ahatanak. erik.pilkington requested review of this revision. Clang used to emit a bad -Wbridge-cast diagnostic on the cast in the attached test. This was because, after 09abecef7

[PATCH] D99661: [SemaObjC] Fix a -Wbridge-cast false-positive

2021-04-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 334801. erik.pilkington added a comment. In D99661#2662601 , @ahatanak wrote: > Should we try to restore the behavior prior to > https://reviews.llvm.org/rG09abecef7bbfda18d34f046954eaa4d491062839 as much > a

[PATCH] D99661: [SemaObjC] Fix a -Wbridge-cast false-positive

2021-04-05 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG803b79221edf: [SemaObjC] Fix a -Wbridge-cast false-positive (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Gith

[PATCH] D95845: [ObjC] Add a command line flag that disables recognition of objc_direct for testability

2021-04-06 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb660abc80d0d: [ObjC] Add a command line flag that disables recognition of objc_direct for… (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D90188: Add support for attribute 'using_if_exists'

2021-04-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90188/new/ https://reviews.llvm.org/D90188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D90188: Add support for attribute 'using_if_exists'

2021-04-20 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Does anyone have any remaining concerns or a desire to take another pass through this patch? If not, then I'll commit this later this week on Aaron's LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90188/new/ https://reviews.llvm.org/D90188 __

<    1   2   3   4   5   6