erik.pilkington updated this revision to Diff 159449.
erik.pilkington retitled this revision from "[Sema] Dig through AutoTypes that
have been deduced to an undeduced AutoType in Type::isUndeducedType" to "[Sema]
Fix an error with C++17 auto non-type template parameters".
erik.pilkington edited t
erik.pilkington added a comment.
Ping!
https://reviews.llvm.org/D48896
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington created this revision.
erik.pilkington added a reviewer: rsmith.
Herald added a subscriber: dexonsmith.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0961r1.html
I don't believe an actual defect report was filed for this, but the paper (in
the "wording" section) claims
erik.pilkington added inline comments.
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:1118-1130
+// ... and if that finds at least one declaration that is a function
+// template whose first template parameter is a non-type parameter ...
+LookupResult::Filter Filter =
erik.pilkington updated this revision to Diff 159629.
erik.pilkington added a comment.
Address review comments.
https://reviews.llvm.org/D50418
Files:
clang/lib/Sema/SemaDeclCXX.cpp
clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp
clang/www/cxx_status.html
Index: clang/www/cxx_status.html
=
erik.pilkington added inline comments.
Comment at: lib/Sema/SemaTemplateInstantiate.cpp:2916-2918
+ if (const VarDecl *VD = dyn_cast(D))
+if (VD->isInitCapture())
+ return nullptr;
Why are we failing to find the instantiation of the VarDecl in this case
erik.pilkington created this revision.
erik.pilkington added reviewers: rjmccall, arphaman.
Herald added a subscriber: dexonsmith.
This fixes rdar://30741878
Thanks!
Erik
Repository:
rC Clang
https://reviews.llvm.org/D50527
Files:
clang/lib/Parse/ParseExpr.cpp
clang/test/Parser/message-
erik.pilkington updated this revision to Diff 159995.
erik.pilkington added a comment.
Remove `isBinaryCXXAlternativeOperatorToken`, this check can be done using
`OpToken.getAsIdentifierInfo()`. Thanks!
FWIW, I can't imagine this being anything but an oversight, we go out of our
way to support
erik.pilkington added a comment.
In https://reviews.llvm.org/D50527#1194660, @rjmccall wrote:
> Assuming you've done enough source-compatibility testing to say with
> reasonable confidence that this won't break anything, I think this is fine.
> It's a core goal of Objective-C/C++ to allow the
erik.pilkington added a comment.
The build came back clean!
https://reviews.llvm.org/D50527
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington added a comment.
Ping!
https://reviews.llvm.org/D48896
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington created this revision.
erik.pilkington added reviewers: jfb, rsmith, aaron.ballman, rjmccall, bruno.
Herald added a subscriber: dexonsmith.
See the recent thread here:
http://lists.llvm.org/pipermail/cfe-dev/2018-July/058494.html
This patch adds the flag -fno-c++-static-destructo
erik.pilkington added a comment.
Ping!
https://reviews.llvm.org/D50527
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington updated this revision to Diff 161594.
erik.pilkington marked 7 inline comments as done.
erik.pilkington added a comment.
In this new patch:
- Fix some grammar errors in the documentation.
- Add a testcase for both attributes appearing on a variable.
- Just use hasArg() in the driv
erik.pilkington added inline comments.
Comment at: clang/include/clang/AST/Decl.h:1472
+ /// Do we need to emit an exit-time destructor for this variable?
+ bool isNoDestroy(const ASTContext &) const;
jfb wrote:
> rsmith wrote:
> > jfb wrote:
> > > This is on
erik.pilkington added a comment.
Sure, done in 340311!
Repository:
rC Clang
https://reviews.llvm.org/D50994
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington added a comment.
Ping!
https://reviews.llvm.org/D48896
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington added a comment.
That test passes for me without this patch applied, why is UsesUnderscores
actually getting set in the radar?
Repository:
rC Clang
https://reviews.llvm.org/D46747
___
cfe-commits mailing list
cfe-commits@lists.ll
erik.pilkington accepted this revision.
erik.pilkington added a comment.
This revision is now accepted and ready to land.
Thanks for the explanation, LGTM.
https://reviews.llvm.org/D46747
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http:
erik.pilkington added a comment.
> One way we could deal with this is by adding an attribute to the compiler to
> indicate "the const is a lie", that we can apply to `std::pair::first`, with
> the semantics being that a top-level `const` is ignored when determining the
> "real" type of the memb
erik.pilkington added a comment.
> I am now thinking about just switching to dot format in
> ParseAvailabilityAttribute() because it's much simpler to maintain
> consistency that way.
Okay, but if we're going to treat underscores as dots while printing
diagnostics and fixits (which I think we
erik.pilkington accepted this revision.
erik.pilkington added a comment.
Great, LGTM!
https://reviews.llvm.org/D46747
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington added a comment.
In https://reviews.llvm.org/D46845#1098634, @rsmith wrote:
> One way we could deal with this is by adding an attribute to the compiler to
> indicate "the const is a lie", that we can apply to `std::pair::first`, with
> the semantics being that a top-level `const
erik.pilkington created this revision.
Previously, clang rejected the following (copied from PR19741):
struct A {
int a = 0;
constexpr A() { a = 1; }
};
constexpr bool f() {
constexpr A a;
static_assert(a.a == 1, "");
return a.a == 1;
}
static_assert(f(), "");
Clang
erik.pilkington updated this revision to Diff 117529.
erik.pilkington marked 2 inline comments as done.
erik.pilkington added a comment.
Thanks for the feedback, in this new patch:
- insert EvaluatingDecl into EvaluatingConstructors instead of checking it in
isEvaluatingDecl()
- Add a comment to
erik.pilkington added inline comments.
Comment at: lib/AST/ExprConstant.cpp:588
+ : EI(EI), Object(Object) {
+DidInsert = EI.EvaluatingConstructors.insert(Object).second;
+ }
rsmith wrote:
> Can the `DidInsert == false` case actually happen?
erik.pilkington created this revision.
erik.pilkington added reviewers: ldionne, mclow.lists, hans.
Herald added a reviewer: EricWF.
Herald added subscribers: dexonsmith, christof.
The other half of this is in https://reviews.llvm.org/D48896, so we shouldn't
claim that we support this feature. Th
erik.pilkington added a comment.
Landed as r340544. @hans: Can you cherry-pick?
Repository:
rCXX libc++
https://reviews.llvm.org/D51172
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
erik.pilkington created this revision.
erik.pilkington added a reviewer: arphaman.
Herald added a subscriber: dexonsmith.
rdar://18335828
Thanks!
Erik
Repository:
rC Clang
https://reviews.llvm.org/D51189
Files:
clang/include/clang/AST/ASTContext.h
clang/include/clang/AST/DeclObjC.h
cl
erik.pilkington added a comment.
In https://reviews.llvm.org/D51189#1211754, @arphaman wrote:
> Hmm, I don't think this solution is ideal, we'd rather have an attribute
> somewhere for other consumers of availability annotations. Does MyObject have
> an implicit decl of `new`, or are we referri
erik.pilkington created this revision.
erik.pilkington added a reviewer: arphaman.
Herald added a subscriber: dexonsmith.
rdar://42717026
Thanks for taking a look!
Repository:
rC Clang
https://reviews.llvm.org/D51649
Files:
clang/lib/Sema/SemaStmt.cpp
clang/test/Sema/switch-availability
erik.pilkington updated this revision to Diff 164064.
erik.pilkington added a comment.
Ping! In the new patch:
- Uncomment __cpp_lib_node_extract, reverting r340544
- Rebase/Clean up the diff a bit
https://reviews.llvm.org/D48896
Files:
libcxx/include/__hash_table
libcxx/include/__node_han
erik.pilkington created this revision.
erik.pilkington added reviewers: aaron.ballman, rsmith.
Herald added subscribers: kristina, dexonsmith.
Namely, print the likely macro name when it's used, and include the actual
computed sizes in the diagnostic message, which are sometimes not obvious.
rda
erik.pilkington added a comment.
In https://reviews.llvm.org/D51189#1211910, @steven_wu wrote:
> I feel like this is a much tricky situation than just new and init. Following
> example is the same situation.
>
> __attribute__((objc_root_class))
> @interface NSObject
> - (void) foo;
> - (
erik.pilkington updated this revision to Diff 164316.
erik.pilkington marked 4 inline comments as done.
erik.pilkington added a comment.
Address @arphaman's review comments.
https://reviews.llvm.org/D51189
Files:
clang/include/clang/AST/ASTContext.h
clang/include/clang/AST/DeclObjC.h
clan
erik.pilkington added a comment.
Ping!
https://reviews.llvm.org/D48896
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington added inline comments.
Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:1267-1269
+ // Instantiate the attributes on both the template declaration and the
associated record declaration.
+ SemaRef.InstantiateAttrsForDecl(TemplateArgs, Pattern, Inst, La
erik.pilkington added a comment.
Looks good to me! @rsmith should probably have the final word though. Thanks
for fixing this.
Repository:
rC Clang
https://reviews.llvm.org/D51997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://li
erik.pilkington updated this revision to Diff 156317.
erik.pilkington added a comment.
Improve the diagnostics. Thanks!
https://reviews.llvm.org/D49085
Files:
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaTemplate.cpp
clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp
erik.pilkington updated this revision to Diff 156338.
erik.pilkington added a comment.
Improve the diagnostics further.
https://reviews.llvm.org/D49085
Files:
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaTemplate.cpp
clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp
erik.pilkington added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:4111
+ "candidate template ignored: %select{template is not a function template"
+ "|is not a member of the enclosing namespace}0">;
rjmccall wrote:
> Your fir
erik.pilkington added a reviewer: aaron.ballman.
erik.pilkington added a comment.
Thanks for working on this! CCing Aaron, who is code owner for attributes.
Comment at: include/clang/Basic/AttrDocs.td:3355
+ let Content = [{
+The ``noderef`` attribute allows for showing a warn
erik.pilkington added a comment.
Ping!
https://reviews.llvm.org/D46845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington created this revision.
erik.pilkington added reviewers: rjmccall, rsmith.
Herald added a subscriber: dexonsmith.
Previously, clang would crash here:
template struct S {
int (^p)() = ^{ return 0; };
};
S x;
The problem was that InstantiateClass() was iterating over all
erik.pilkington added a comment.
(Forgot to add rdar://41200624)
Repository:
rC Clang
https://reviews.llvm.org/D49688
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington added a comment.
In https://reviews.llvm.org/D49688#1172269, @rjmccall wrote:
> I honestly don't know why the `BlockDecl` is in the members list in the first
> place; that seems wrong, for the same reason that we wouldn't (I assume?)
> consider a lambda's implicit record to be a
erik.pilkington updated this revision to Diff 156912.
erik.pilkington added a comment.
In this new patch:
- Rebase on top of changes in https://reviews.llvm.org/D46845
- Move in some forward decls that I accidentally left in
https://reviews.llvm.org/D46845
- Add some missing visibility attribute
erik.pilkington updated this revision to Diff 157309.
erik.pilkington added a comment.
Implement @rsmith's second suggestion. Thanks!
https://reviews.llvm.org/D49439
Files:
clang/lib/Sema/SemaTemplate.cpp
clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp
Index: clang/test/Sema
erik.pilkington added inline comments.
Comment at: clang/lib/Sema/SemaTemplate.cpp:1899-1907
// Canonicalize the type. This (for instance) replaces references to
// typedef members of the current instantiations with the definitions of
// those typedefs, avoiding tr
erik.pilkington added a comment.
Hi Balaji,
I reduced your testcase a bit more, this looks like the can be a crash on
valid. Can you use the more minimal version in the testcase?
template
struct e {
e(a) {}
};
e c(0);
Also: you should add cfe-commits as a subscriber when creatin
erik.pilkington created this revision.
erik.pilkington added reviewers: rsmith, rjmccall.
Herald added a subscriber: dexonsmith.
Only apply this exception on a type that we're able to check.
Thanks!
Erik
Repository:
rC Clang
https://reviews.llvm.org/D49868
Files:
clang/lib/Sema/SemaInit.c
erik.pilkington updated this revision to Diff 157575.
erik.pilkington added a comment.
Add the testcase @rjmccall requested.
https://reviews.llvm.org/D49868
Files:
clang/lib/Sema/SemaInit.cpp
clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp
Index: clang/test/SemaCXX/cxx1z-cl
erik.pilkington accepted this revision.
erik.pilkington added a comment.
This revision is now accepted and ready to land.
LGTM, thanks! Do you have your commit rights yet?
Comment at: include/clang/AST/TemplateBase.h:469
+
+// Allow more additional argument kinds for the co
erik.pilkington added inline comments.
Comment at: test/CodeGenCXX/empty-struct-init-list.cpp:1-4
+// RUN: %clang_cc1 -std=c++11 %s
+// RUN: %clang_cc1 -std=c++14 %s
+// RUN: %clang_cc1 -std=c++17 %s
+// expected-no-diagnostics
You should add -emit-llvm, or el
erik.pilkington created this revision.
erik.pilkington added a reviewer: rsmith.
Herald added a subscriber: dexonsmith.
Clang used to error out on the attached test case because we deduced an auto
type to an undeduced auto type in the template-id G. This caused
Sema::CheckNonTypeTemplateParamete
erik.pilkington added a comment.
Ping!
https://reviews.llvm.org/D46845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington added a comment.
In https://reviews.llvm.org/D46845#1183435, @mclow.lists wrote:
> One more thing -
> When you add a new header file, you need to update
> `include/module.modulemap`, `test/libcxx/double_include.sh.cpp`, and
> `include/CMakeLists.txt`.
> Take a look at https:/
erik.pilkington added a comment.
Hi Balaji,
Can you try to manually reduce the attached testcase? Its really difficult to
understand exactly what is actually happening here, and why your fix is
correct, without having a minimal reproducer. Ideally there would just be a few
decls that succinctly
erik.pilkington created this revision.
erik.pilkington added a reviewer: arphaman.
Herald added subscribers: Sanitizers, llvm-commits, dexonsmith, dberris.
This breaks some configurations, so just forward declare everything that we
need.
rdar://35943793
Thanks for taking a look!
Erik
Reposito
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:15747
+ // warn when it's used inappropriately (i.e. not if(@available)).
+ if (getCurFunctionOrMethodDecl
erik.pilkington added inline comments.
Comment at: src/cxa_demangle.cpp:3036
break;
-if (db.names.size() < 2)
+assert(k0 <= k1 && "parse_type() mutated the name stack");
+if (k1 == k0)
--
erik.pilkington added a comment.
r303806 removes the assertion (instead just returning first). I though this
should never happen, I'm looking into this testcase to see if there is another
bug here.
Thanks,
Erik
Repository:
rL LLVM
https://reviews.llvm.org/D33368
_
erik.pilkington added a comment.
> Also, are you now maintaining this code?
> I am trying to find someone who wants to be CC-ed to other demangler bugs
> automatically reported by oss-fuzz.
I don’t think I’ll accept the title of maintainer, (I only have one commit in
this file!) but I have som
erik.pilkington created this revision.
Previously, @implementations of categories that extended
unavailable/deprecated/partial @interfaces triggered availability diagnostics.
There was no way to turn this off, as we check the use of the unavailable decl
outside of the context of the @implementa
erik.pilkington created this revision.
This patch drops support for suppressing -Wunguarded-availability with
redeclarations. This was behavior left over from the -Wpartial-availability
days, where it was the only way of silencing the diagnostic. Now that we have
@available and better support f
erik.pilkington created this revision.
Herald added a reviewer: EricWF.
This patch adds a simple work-stealing scheduler meant for use as a fallback
implementation for the C++17 parallel stl algorithms. This scheme follows a
very simple fork/join API that should be easy to map onto different und
erik.pilkington created this revision.
A DecompositionDecls' bindings have a null type until the initializer is
attached, if the initializer is dependent, then the bindings should be set to
have dependent type. For non-foreach bindings, this is done in
Sema::CheckCompleteDecompositionDeclaratio
erik.pilkington added a comment.
Ping!
https://reviews.llvm.org/D33977
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington added inline comments.
Comment at: lib/Sema/SemaDeclAttr.cpp:7315
+ default:
+assert(!Triple.isMacOSX() && "MacOS should be handled in the switch");
+// New targets should always warn about availability.
This assert seems a bit redundant,
erik.pilkington added a comment.
Ping!
https://reviews.llvm.org/D33816
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington added inline comments.
Comment at: lib/Sema/SemaDeclAttr.cpp:6944
-diag = !ObjCPropertyAccess ? diag::err_unavailable
- : diag::err_property_method_unavailable;
-diag_message = diag::err_unavailable_message;
W
erik.pilkington added inline comments.
Comment at: lib/Sema/SemaDeclAttr.cpp:7031
+Introduced) &&
+!S.Diags.isIgnored(diag::warn_unguarded_availability_new, Loc);
+diag = NewWarning ? diag::warn_partial_availability_new
Sorry to keep this
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/D34264
___
cfe-commits mailing list
cfe-commi
erik.pilkington accepted this revision.
erik.pilkington added a comment.
This revision is now accepted and ready to land.
LGTM!
https://reviews.llvm.org/D33606
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mai
erik.pilkington added inline comments.
Comment at:
test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_deployment.fail.cpp:35
+ // expected-error@-10 {{call to unavailable function 'operator new[]':
introduced in macOS 10.13}}
+ // expected-note@new:
erik.pilkington updated this revision to Diff 103852.
erik.pilkington added a comment.
Improve enum diagnostics, as @arphaman suggested. This causes a bit of churn
throughout the availability diagnostic machinery, if it would make it at all
easier to review, I would be happy to separate out thes
erik.pilkington updated this revision to Diff 103958.
erik.pilkington added a comment.
Make the diagnostic reference the context declaration instead of the offending
decl if no enclosing decl is found, fixing the diagnostic bug @arphaman pointed
out.
https://reviews.llvm.org/D33816
Files:
i
erik.pilkington created this revision.
erik.pilkington added reviewers: EricWF, george.burgess.iv.
This patch adds demangling for pass_object_size attribute
(https://clang.llvm.org/docs/AttributeReference.html#pass-object-size). This
attribute applies to function parameters. This attribute is ma
erik.pilkington updated this revision to Diff 127067.
erik.pilkington added a comment.
Add a testcase with pass_object_size[0-3].
https://reviews.llvm.org/D41261
Files:
src/cxa_demangle.cpp
test/test_demangle.pass.cpp
Index: test/test_demangle.pass.cpp
erik.pilkington created this revision.
erik.pilkington added reviewers: EricWF, mclow.lists, dexonsmith.
This patch fixes some longstanding bugs in the demangler to do with it's
handling of variadic templates.
Currently the demangler handles variadic templates by expanding them into the
Names s
erik.pilkington added inline comments.
Comment at: src/cxa_demangle.cpp:130
- // Offset of position in buffer, used for building stream_string_view.
- typedef unsigned StreamPosition;
-
This caching API is being removed because it is no longer valid: if a node
erik.pilkington created this revision.
erik.pilkington added reviewers: EricWF, mclow.lists, dexonsmith.
As of https://reviews.llvm.org/D41885, every parse_* function now either
returns a single Node* or fails. I'm using this new rule to clean up the
parsing for the demangler, and also update it
erik.pilkington created this revision.
erik.pilkington added reviewers: EricWF, mclow.lists, dexonsmith.
As of https://reviews.llvm.org/D41885, every parse_* function now either
returns a single Node* or fails. I'm using this new rule to clean up the
parsing for the demangler, and also update it
erik.pilkington created this revision.
erik.pilkington added reviewers: rsmith, EricWF, mclow.lists.
Herald added subscribers: christof, kosarev.
and define `__value_type` as a union between pair
and pair so that various operations can move into/from these pairs
[1]. This is a pretty blatant s
erik.pilkington updated this revision to Diff 149449.
erik.pilkington marked 10 inline comments as done.
erik.pilkington added a comment.
Address review comments. Thanks!
https://reviews.llvm.org/D47607
Files:
libcxx/include/__hash_table
libcxx/include/__tree
libcxx/include/map
libcxx/i
erik.pilkington added a comment.
In https://reviews.llvm.org/D47607#1118547, @EricWF wrote:
> I should have asked, have we actually seen a midcompile caused by this? Is
> there a reproducer? Or is this purerly speculative?
Nope, pure speculation. I still think we should still fix this though.
erik.pilkington added inline comments.
Comment at: libcxx/include/__hash_table:2261
+_NodeHandle
+__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_extract_unique(
+key_type const& __key)
EricWF wrote:
> If I'm not mistaken, `__node_handle_extract_uniqu
erik.pilkington accepted this revision.
erik.pilkington added a comment.
This revision is now accepted and ready to land.
LGTM, thanks for adding the test!
Repository:
rL LLVM
https://reviews.llvm.org/D47887
___
cfe-commits mailing list
cfe-commi
erik.pilkington accepted this revision.
erik.pilkington added a comment.
This revision is now accepted and ready to land.
LGTM. Looks like LLDB has some uses of VersionTuple, you should fix those to
#include the LLVM version before removing the header here. (Or, better yet, do
it all atomically
erik.pilkington added a comment.
Ping!
https://reviews.llvm.org/D46845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington created this revision.
erik.pilkington added a reviewer: rsmith.
The constexpr evaluator was erroring out because these templates weren't
defined. Despite being used in a discarded statement, we still need to
constexpr evaluate them, which means that we need to instantiate them.
erik.pilkington created this revision.
erik.pilkington added reviewers: rsmith, rjmccall.
Herald added a subscriber: dexonsmith.
Clang used to error out on the attached testcase, due to multiple definitions
of `foo`. The problem is that multiple FunctionTemplateDecl::Common
pointers are created
erik.pilkington added inline comments.
Comment at: clang/lib/Sema/SemaDecl.cpp:10015
// merged.
if (MergeFunctionDecl(NewFD, OldDecl, S, MergeTypeWithPrevious)) {
NewFD->setInvalidDecl();
The problem is here, MergeFunctionDecl() needs the injecte
erik.pilkington created this revision.
erik.pilkington added reviewers: rsmith, aaron.ballman.
Herald added a subscriber: dexonsmith.
These two diagnostics are noisy, so its reasonable for users to opt-out of them
when -Wconversion is enabled.
Fixes rdar://45058981
Thanks for taking a look!
R
erik.pilkington added inline comments.
Comment at: clang/test/Sema/implicit-int-conversion.c:1-4
+// RUN: %clang_cc1 -Wconversion -Wno-implicit-int-conversion -DSMALL=char
-DBIG=int -DNO_DIAG
+// RUN: %clang_cc1 -Wno-conversion -Wimplicit-int-conversion -DSMALL=char
-DBIG=int
+
erik.pilkington updated this revision to Diff 168912.
erik.pilkington added a comment.
Actually run the tests!
https://reviews.llvm.org/D53048
Files:
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/test/Sema/implicit-int-conversion.c
erik.pilkington added a comment.
In https://reviews.llvm.org/D53046#1259933, @rjmccall wrote:
> The linking does actually happen in this test case, right? Can we just do
> something when linking them to unify their `Common` structures?
Yep, that would work too I think. We can't properly merge
erik.pilkington updated this revision to Diff 168939.
erik.pilkington added a comment.
Merge the common pointers rather than trying to use the previous one. Thanks!
https://reviews.llvm.org/D53046
Files:
clang/include/clang/AST/DeclTemplate.h
clang/lib/AST/DeclTemplate.cpp
clang/lib/Sema/
erik.pilkington created this revision.
erik.pilkington added reviewers: rjmccall, ahatanak, jfb.
Herald added a subscriber: dexonsmith.
Some ObjC users declare a `extern` variable named `OBJC_CLASS_$_Foo`, then use
it's address as a `Class`. I.e., one could define `isInstanceOfF`:
BOOL isInsta
erik.pilkington created this revision.
erik.pilkington added reviewers: bruno, rsmith.
Herald added a subscriber: dexonsmith.
This patch makes clang include headers found in modulemap files in the `.d`
file. This is necessary to capture symlinked headers, which previously were
ignored, since onl
1 - 100 of 589 matches
Mail list logo