Open llvmbot opened 11 years ago
The problem is this bit of code in SemaChecking.cpp:
// If the function is defined as a builtin macro, do not show macro expansion. if (SM.isMacroArgExpansion(SL)) { SL = SM.getSpellingLoc(SL); SR = SourceRange(SM.getSpellingLoc(SR.getBegin()), SM.getSpellingLoc(SR.getEnd())); }
Not sure what the correct logic is off the top of my head.
Extended Description
Example:
Of course writing in "dtString" for macro argument "A" isn't right. Here's the two-file testcase: nlewycky@ducttape:~$ cat strncat-macro.c
nlewycky@ducttape:~$ cat strncat-hdr.h