[libTooling] cl::location(x) specified more than once!

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[libTooling] cl::location(x) specified more than once!

Fangrui Song via cfe-dev
I am trying to write an out of tree tool, right now I am just playing
around. But I am running into an issue.

My file could be just
```
#include "clang/ASTMatchers/ASTMatchers.h"
int main() {}
```
when I run this executable with no arguments, it dies with this:
```
: for the --info-output-file option: cl::location(x) specified more than once!
: CommandLine Error: Option 'disable-symbolication' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
```
Also if I add an llvm::cl::OptionCategory even with a very unique name
I get an assertion failure: `Assertion
`count_if(RegisteredOptionCategories, [cat](const OptionCategory
*Category) { return cat->getName() == Category->getName(); }) == 0 &&
"Duplicate option categories"' failed.`

I also tried one building one of the external clang examples
https://clang.llvm.org/docs/ExternalClangExamples.html,
include-what-you-use
https://github.com/include-what-you-use/include-what-you-use and it
also died with:
```
: for the --info-output-file option: cl::location(x) specified more than once!
include-what-you-use:
/homes/abrachet/scratch/llvm-install/llvm/lib/Support/CommandLine.cpp:361:
void (anonymous
namespace)::CommandLineParser::registerCategory(llvm::cl::OptionCategory
*): Assertion `count_if(RegisteredOptionCategories, [cat](const
OptionCategory *Category) { return cat->getName() ==
Category->getName(); }) == 0 && "Duplicate option categories"' failed.
```

I'm really at a loss here. Does anyone know whats going on? Thanks.

Alex
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev