[PATCH] [Sema] Proposed fix for PR 21837

Richard Smith richard at metafoo.co.uk
Tue May 12 14:10:42 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: SemaAccess.cpp:1361-1362
@@ +1360,4 @@
+
+    if (FinalAccess == AS_none)
+      return AR_inaccessible;
+
----------------
Please add an assert that the `Target` is marked invalid here. I would also think that assuming invalid declarations are accessible is a better default; we don't want additional follow-on errors after the initial diagnostic that resulted in the entity being marked as invalid.

(And this comment also applies to the other change.)

http://reviews.llvm.org/D9451

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list