https://bugs.llvm.org/show_bug.cgi?id=50249
Bug ID: 50249
Summary: [Python] CompilationDatabase.getCompileCommands does
not work as documented
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Tooling
Assignee: unassignedclangb...@nondot.org
Reporter: edas...@att.net
CC: llvm-bugs@lists.llvm.org
Created attachment 24838
--> https://bugs.llvm.org/attachment.cgi?id=24838&action=edit
Standalone reproduction
The documentation for getCompileCommands() says:
Get an iterable object providing all the CompileCommands available to
build filename. Returns None if filename is not found in the database.
The actual behavior for the "not found" case differs in surprising ways:
1. When a regular source file (e.g. .cpp) is not found, an empty iterable is
returned instead of None
2. If a header file (e.g. .h) is not found, a guess at the compile command is
made and returned
I believe the documentation should be updated to reflect the actual behavior.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs