[LLVMbugs] [Bug 11680] New: scan-build errors on c++ includes in .c files, while clang++ does not
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Dec 30 12:34:56 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=11680
Bug #: 11680
Summary: scan-build errors on c++ includes in .c files, while
clang++ does not
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
AssignedTo: kremenek at apple.com
ReportedBy: fedorabugmail at yahoo.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
clang++ and g++ both successfully build my code which has source files with
extensions cpp and c . However scan-build complains about the presence of C++
includes in any file with a .c extension and does not analyze those files.
Using the --use-c++ switch causes the entire analysis to fail.
The command line used for compilation is:
g++ -O3 -Wall \
<list_of_files>
Adding the option --use-c++ causes the below error:
~/llvm/llvm/tools/clang/tools/scan-build/scan-build --use-c++ g++ \
<list_of_files>
Can't exec "<first_file_in_list.cpp>": Permission denied at
~/llvm/llvm/tools/clang/tools/scan-build/scan-build line 923.
scan-build will fail on this code, but clang++ will succeed.
#include <string>
int main(int argc, char * argv[])
{
std::string temp;
return 0;
}
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list