With ObjCPropertyDecl, ASTNode.OrigD can be a ObjCPropertyImplDecl
which is not a NamedDecl, leading to a crash since the code
incorrectly assumes ASTNode.OrigD will always be a NamedDecl.
Details
Diff Detail
- Repository
- rCTE Clang Tools Extra
- Build Status
Buildable 27164 Build 27163: arc lint + arc unit
Event Timeline
Unfortunately I can't get ninja check-clangd to build:
/Users/davg/dev/llvm/source/llvm/tools/clang/tools/extra/clang-tidy/bugprone/ParentVirtualCallCheck.cpp:54:27: error: no matching member function for call to 'getThisType' ActualMemberDecl->getThisType(ActualMemberDecl->getASTContext()) ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ /Users/davg/dev/llvm/source/llvm/tools/clang/include/clang/AST/DeclCXX.h:2182:12: note: candidate function not viable: requires 0 arguments, but 1 was provided QualType getThisType() const; ^ /Users/davg/dev/llvm/source/llvm/tools/clang/include/clang/AST/DeclCXX.h:2184:19: note: candidate function not viable: requires 2 arguments, but 1 was provided static QualType getThisType(const FunctionProtoType *FPT, ^ 1 error generated. [1230/1512] Building CXX object tools/clang/tools/extra/clang-tidy/cert/CMakeFiles/clangTidyCERTModule.dir/CERTTidyModule.cpp.o ninja: build stopped: subcommand failed.
Unfortunately I can't get ninja check-clangd to build:
Looks like clang-tools-extra uses an old revision. Rebasing after rL350916 should do the trick.
Thanks, looks like my update script was skipping over that repo. Test case implemented. As I don't have commit access, can you land this for me?
Done. I had to remove Container::_magic from the list of expeced symbols to make the test pass, let me know if it should actually be there.
Again, thanks for the fix!
It looks like Container::_magic is a platform-dependent completion, I don't have it on Linux, but http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/42665 fails because it's not in the list.
Submitted rL351943 to workaround the failure. @dgoldman, any idea why completion might be there on some platforms, but not the others?
Perhaps property auto-synthesis isn't enabled there? I wonder if the following manual synthesis would help:
@implementation Container @synthesize magic; @end
Could you please leave a FIXME mentioning objc properties are not indexed properly here?