r185773 - Fixed source range for functional cast and unresolved construct expr nodes.

Enea Zaffanella zaffanella at cs.unipr.it
Mon Jul 8 01:48:32 PDT 2013

On 07/08/2013 08:59 AM, NAKAMURA Takumi wrote:
> Enea,
> It was incompatible to ms mode. I made it suppressed partially in r185795.
> clang\unittests\AST\SourceLocationTest.cpp(222):
> error: Value of: Verifier.match( "template <typename U>\n" "U foo()
> {\n" "  return U{};\n" "}", unresolvedConstructExpr(), Lang_CXX11)
>    Actual: false (Could not find match)
> Expected: true
> [  FAILED  ] CXXUnresolvedConstructExpr.SourceRange (4 ms)
> Do you think it'd be better to add "-fno-delayed-template-parsing" there?
> ...Takumi

Hi Takumi.

Thank you for committing the workaround avoiding failure.

As for your hint ... for me it would be fine.
The only problem is that there currently seems to be no way to specify 
additional args when using RangeVerifier (unless I am missing something 
obvious). What about adding a further

           std::vector<std::string>& Args

parameter to MatchVerifier method:

   template <typename MatcherType>
   testing::AssertionResult match(const std::string &Code,
                                  const MatcherType &AMatcher,
                                  Language L);

Or maybe add an overloaded version with such an additional parameter?


More information about the cfe-commits mailing list