lebedev.ri added a comment. 1. What about `__PRETTY_FUNCTION__` ? 2. Consider following generic error handling macro:
(ThrowException is some template function) #undef STR #define STR(a) XSTR(a) #define ThrowExceptionHelper(CLASS, fmt, ...) ThrowException<CLASS>(__FILE__ ":" STR(__LINE__) ": %s: " fmt, __PRETTY_FUNCTION__, ##__VA_ARGS__) #endif Which is called like `if(somethig) ThrowException(std::exception, "%s", "bar");` Even though the function name may be useless, file/line info is still there and is(?) correct. Perhaps there should not be a warning in such a case? https://reviews.llvm.org/D33497 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits