Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353265 - C++ analysis cannot resolve variables declared in conditional statements
Summary: C++ analysis cannot resolve variables declared in conditional statements
Status: CLOSED DUPLICATE of bug 362976
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 8.0   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: CDT Codan Inbox CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-27 21:25 EDT by Talin CLA
Modified: 2016-12-22 18:49 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Talin CLA 2011-07-27 21:25:57 EDT
Build Identifier: 20110615-0604

The C++ code analyzer reports that the symbol 'var' could not be resolved in the following statement:

   if (VariableDefn * var = dyn_cast<VariableDefn>(*it)) {
     // etc...
   }

This appears to affect every case of a variable being declared in a conditional expression.


Reproducible: Always
Comment 1 Tomasz Wesolowski CLA 2011-08-01 05:50:41 EDT
I can't reproduce that error. Can you provide a single standalone .cpp file which would show the problem?
Comment 2 Nathan Ridge CLA 2013-07-21 23:31:50 EDT
This has since been fixed (see bug 362976).
Comment 3 Nathan Ridge CLA 2016-12-22 18:49:41 EST

*** This bug has been marked as a duplicate of bug 362976 ***