felipeprov / include-what-you-use

Automatically exported from code.google.com/p/include-what-you-use
Other
0 stars 0 forks source link

compile error with llvm/clang release_31 branch #76

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?  Give the *exact* arguments passed
to include-what-you-use, and attach the input source file that gives the
problem (minimal test-cases are much appreciated!)
1. check out llvm from branches/release_31
2. check out corresponding clang and related subdirs
3. check out iwyu current trunk

What is the expected output? What do you see instead?
should compile and link.

instead, it errors with this:
iwyu.cc: In member function ‘virtual clang::ASTConsumer* 
include_what_you_use::IwyuAction::CreateASTConsumer(clang::CompilerInstance&, 
llvm::StringRef)’:
iwyu.cc:3661:32: error: ‘class clang::Preprocessor’ has no member named 
‘addCommentHandler’

What version of the product are you using? On what operating system?
latest trunk as of this writing, compiling on SL/RHEL 6.1.x. clang/llvm 
compiles, installs, and passes make check.

Original issue reported on code.google.com by plaztiks...@gmail.com on 11 Jul 2012 at 4:38

GoogleCodeExporter commented 8 years ago
looks like the method was renamed to 'AddCommentHandler'. changing the 
lowercase 'a' to uppercase fixes the compile issue and produces a working 
binary.

Original comment by plaztiks...@gmail.com on 11 Jul 2012 at 4:43

GoogleCodeExporter commented 8 years ago
We try to keep IWYU trunk in sync with Clang trunk. The case change for 
AddCommentHandler happened after 3.1, if I recall correctly.

Original comment by kim.gras...@gmail.com on 11 Jul 2012 at 5:37

GoogleCodeExporter commented 8 years ago
That said, it would be helpful if we could create a compatible tag for IWYU 
whenever LLVM/Clang does a point release.

Original comment by kim.gras...@gmail.com on 13 Jul 2012 at 6:35

GoogleCodeExporter commented 8 years ago
I remember about tags for LLVM/Clang release. I haven't made a tag because IWYU 
was broken at the moment of 3.1 release (yeah, it doesn't work correctly now 
too) and I didn't want to encourage users to use broken IWYU. If you think we 
should create tags even if IWYU is broken - tell me so (the best solution of 
course is to fix IWYU and create a tag).

Original comment by vsap...@gmail.com on 13 Jul 2012 at 6:47

GoogleCodeExporter commented 8 years ago
Yes, I agree that the best would be to fix first and then tag, but we're always 
a little behind and short on time :-)

Maybe a good strategy would be to create a _branch_ if IWYU is currently 
broken, and a _tag_ if it's currently working against the LLVM release tag?

Then we can take some time to fix up the branch until it seems to work with the 
LLVM release, and then create a tag that doesn't change.

Original comment by kim.gras...@gmail.com on 13 Jul 2012 at 6:59

GoogleCodeExporter commented 8 years ago
I like the idea with branch. I plan to try such approach with Clang 3.2, if 
necessary.

Original comment by vsap...@gmail.com on 17 Jul 2012 at 10:21

GoogleCodeExporter commented 8 years ago
We've used branches for 3.2 and 3.4 releases, for 3.3 branching wasn't 
necessary. And this approach proved to be working fine, I think.

Thanks plaztiksyke for help in streamlining IWYU releases. We haven't fixed 
IWYU for LLVM/Clang 3.1, because of newer releases. I think we can close this 
issue now.

Original comment by vsap...@gmail.com on 21 Jan 2014 at 6:03