[PATCH] Location and Range unittests for FriendDecl

Nikola Smiljanić popizdeh at gmail.com
Thu Jun 12 16:54:14 PDT 2014


Turns out we didn't have correct location and range for class template friend. The same was true for case where friend is not the first token as in Richard's inline example.

Manuel:
Are my constructor/destructor matchers good?

Richard:
1. What's the TypeSourceInfo case in FriendDecl::getSourceRange? 
2. I couldn't find a way to hit the first call to FriendDecl::Create inside Sema::ActOnTemplatedFriendTag (some kind of explicit specialization case). I tried issuing a random diagnostic from there hoping it would break something in the test suite but it seems we don't have any coverage for this?

http://reviews.llvm.org/D3906

Files:
  include/clang/AST/DeclFriend.h
  include/clang/Sema/Sema.h
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaDeclCXX.cpp
  lib/Sema/SemaTemplate.cpp
  unittests/AST/SourceLocationTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3906.10374.patch
Type: text/x-patch
Size: 11509 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140612/2a8cb098/attachment.bin>


More information about the cfe-commits mailing list