[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-commits
Subject:    Re: [PATCH] D11789: Modify DeclaratorChuck::getFunction to be passed an Exception Specification Sour
From:       Nathan Wilson <nwilson20 () gmail ! com>
Date:       2015-08-06 2:28:41
Message-ID: 365ad7e47337ff1e1fcd789b580341c2 () localhost ! localdomain
[Download RAW message or body]

nwilson added a comment.

I'll make the fixes based on the comments, but had question about the FunctionTypeInfo in the \
meantime.


================
Comment at: lib/Sema/SemaDecl.cpp:7447-7450
@@ -7446,1 +7446,6 @@
 
+      if (const FunctionProtoType *FPT = R->getAs<FunctionProtoType>()) {
+        if (FPT->hasExceptionSpec()) {
+          auto LocBeg = D.getFunctionTypeInfo().getExceptionSpecLocBeg();
+          auto LocEnd = D.getFunctionTypeInfo().getExceptionSpecLocEnd();
+          Diag(LocBeg, diag::err_function_concept_exception_spec)
----------------
rsmith wrote:
> This will assert if there isn't a `FunctionTypeInfo` for the declaration, which can \
> theoretically happen if it's declared via an (ill-formed today) `typedef`. (It also might not \
> provide a source range if the exception specification is implicit, for instance because the \
> function template is a destructor or deallocation function, but passing an empty SourceRange \
> to the FixItHint should just result it in being ignored.)
Hmm, I'm not sure if we'd run into that case because I don't believe we can have a `concept` \
specified as a typedef (check is yet to be added) and a check exists for being in a \
non-namespace scope. Do you think a check should still be added verifying that the \
FunctionTypeInfo exists?


http://reviews.llvm.org/D11789



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic