[PATCH] D32759: Fix errored return value in CheckFunctionReturnType and add a fixit hint

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 6 09:41:40 PDT 2017


efriedma added a comment.

The difference between returning true and false here is just the way error recovery works: when we return true, we know the type is invalid, so we suppress it, and subsequent errors involving the declaration.  Example (Objective-C++) where we currently print two errors:

  @class NSObject;
  template<typename T> struct C {
      static T f();
  };
  int g() { NSObject *x = C<NSObject>::f(); } 


https://reviews.llvm.org/D32759





More information about the cfe-commits mailing list