[PATCH] D26503: [Parser][ObjC] Improve diagnostics and recovery when C++ keywords are used as identifiers in Objective-C++
Alex Lorenz via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 16 10:36:16 PST 2016
arphaman added inline comments.
================
Comment at: lib/Parse/ParseDecl.cpp:5405
+ // Objective-C++: Detect C++ keywords and try to prevent further errors by
+ // treating these keyword as valid member names.
+ if (getLangOpts().ObjC1 && getLangOpts().CPlusPlus &&
----------------
manmanren wrote:
> Does C++ have the same issue? Or is this only needed for Objective-C++?
I suppose it kinda does have it as well, but Objective-C++ has worse error recovery for Objective-C declarations in this case, so it's more important for it. I wouldn't mind adding a similar diagnostic for C++ though, but I think that should be done in a separate patch.
Repository:
rL LLVM
https://reviews.llvm.org/D26503
More information about the cfe-commits
mailing list