1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00
Commit graph

225 commits

Author SHA1 Message Date
John Camelon
0adb9b9d20 Patch for Andrew Niefer.
Core:
        In prefix lookup, the lookup does not stop when a symbol is found, also abiguity resolution is modified.
        Add IContainerSymbol.prefixLookup (signature subject to change)
        Add ParserSymbolTable.LookupMode, an enum with 2 values: NORMAL, PREFIX
        In prefix mode, the lookup does not stop when a symbol is found.

Tests:
        ParserSymbolTableTest.testBug46882
        ParserSymbolTableTest.testPrefixLookup_Unqualified
        ParserSymbolTableTest.testPrefixLookup_Qualified
        ParserSymbolTableTest.testPrefixLookup_Inheritance
2003-11-28 04:58:00 +00:00
Hoda Amer
32fc5c80ab New Content Assist framework 2003-11-27 19:25:49 +00:00
John Camelon
fcfd56c2af Patch for Andrew Niefer.
Refactor the symbol table by splitting the ParserSymbolTable.Declaration 
class in 4 classes and moving it to not be nested
Tests have been updated and tested on windows & Linux
2003-11-20 15:23:01 +00:00
Hoda Amer
008ec4a579 Completion Engine Work 2003-11-19 15:11:51 +00:00
Hoda Amer
4d7450e8fb Bug Fixes for the complete AST factory 2003-11-13 19:27:29 +00:00
John Camelon
df634f2e75 CORE
Fixed Bug 39554 : _Pragma directive is not supported (ANSI C99) 

TESTS
	Moved testBug39554() from ASTFailedTests to QuickParseASTTests.
2003-11-07 19:49:36 +00:00
John Camelon
39f8ff8c86 Removed one last remainder of core.model.Util in parser to unbreak 2.0 build. 2003-11-06 19:41:33 +00:00
John Camelon
13b7aeb128 CORE
Fixed Bug 44838 : exception when resolving parameter references in a constructor 
	Fixed Bug 46165 : fields referenced in constructor chains are not called back upon 
	Fixed Bug 45551 : Macro replacement in #include <file.h> directives 

TESTS
	Added CompleteParseASTTest::testBug44838().  
	Added CompleteParseASTTest::testBug46165().  
	Added ScannerTestCase::testBug45551().
2003-11-06 04:57:38 +00:00
John Camelon
97e203468e CORE
Cleaned up the ParserFactory interface to check for validity of input arguments.  
	Moved NullSourceElementRequestor and ScannerInfo to public interface as requested. 
	Restructured code so that no Eclipse/CDT source outside the parser source directory is used.
	Updated parser clients to use new ParserFactory (stand-alone parser work item).  	

UI & TESTS
	Updated parser clients to use new ParserFactory (stand-alone parser work item).
2003-11-05 23:35:28 +00:00
John Camelon
56c76eb3e7 CORE
Removed warnings from parser source tree.  
	Removed preliminary task tags support to clean up parser interfaces and implementation.   
	Added preliminary IProblem support to 

UI
	Updated parser clients to use new IProblem strategy.  

TESTS
	Updated parser clients to use new IProblem strategy.
2003-11-05 18:15:21 +00:00
John Camelon
83382d0514 Added initial code assist/parser interface. 2003-11-03 14:17:15 +00:00
John Camelon
1a068f661e Patch for Andrew Niefer
core:
Fixed Bug 44925 : Search: Elaborated type specifier
Partially Fixed Bug 44510 : C/C++ Search gives wrong results 

ui:
Fixed Bug 44337 : Disabling of "definition" not making sense in Search 
dialog
Fixed Bug 44947 : Navigate from Outline: Enumeration type not 
pre-populated
Fixed Bug 44948 : Navigate via Open Declarations: typedef decl not found
2003-11-03 14:00:24 +00:00
John Camelon
a95faa4dbe CORE
Fixed Bug 45476 : preprocessor macro "defined" not handled correctly 
	Fixed Bug 45477 : macro redefines prevent further parsing 

TESTS
	Added testBug45476() to ScannerTestCase.  
	Added testBug45477() to ScannerTestCase.
2003-10-24 21:34:15 +00:00
John Camelon
5be9f16c62 CORE
Fixed Bug 39542 : Parser fails on 'struct' parameter types 
	Fixed Bug 39549 : Designated initializers are not supported (ANSI C99) 
	Fixed Bug 39551 : Complex and imaginary numbers are not supported (ANSI C99) 

TESTS
	Moved testBug39542() from ASTFailedTests to QuickParseASTTests.
	Moved testBug39549() from ASTFailedTests to QuickParseASTTests.
	Added testCDesignatedInitializers() to CompleteParseASTTests.
	Moved testBug39551A() from ASTFailedTests to QuickParseASTTests. 
	Moved testBug39551B() from ASTFailedTests to QuickParseASTTests. 
	Added testCBool() to QuickParseASTTests.  
	Added testBug39551A(), testBug39551B() and testCBool to CompleteParseTests.
2003-10-24 17:49:22 +00:00
John Camelon
dfdfecab15 CORE
Fixed Bug 40007 : Parser reports success when it fails
	Fixed Bug 44305 : Scanner/preprocessor fails on conditionals using hexidecimal 
	Fixed Bug 41935 : parser provides wrong name on namespace aliases 
	Fixed Bug 39525 : Parser fails on expressions that take address of overloaded operators 
	Fixed Bug 45287 : Scanner does not accept character sequence literals 
	Fixed Bug 36550 : Error recovery with unterminated string is weak 
	Fixed Bug 41063 : Remove unused K&R C support from ANSI Parser 
	Fixed Bug 39528 : Function try-blocks are not supported by the parser (ANSI C++) 
	Fixed Bug 39538 : Parser fails on explicit instantiation of templated operators 
	Fixed Bug 39536 : Parser fails on templated constructors/conversion operators 
	Refactored Scanner to make it easier to debug.  

TESTS
	Moved testBug40007() from ASTFailedTests to QuickParseASTTests.  
	Added QuickParseASTTests::testBug40759().  
	Added QuickParseASTTests::testBug44633().  
	Added ScannerTestCase::testBug44305().  
	Added QuickParseASTTests::testBug41935(). 
	Moved testBug39525() from ASTFailedTests to QuickParseASTTests.  
	Added ScannerTestCase::testBug45287(). 
	Moved testBug39528() from ASTFailedTests to QuickParseASTTests.  
	Moved testBug39538() from ASTFailedTests to QuickParseASTTests.  
	Added QuickParseASTTests::testBug39536().  
	Moved testBug39536A() from ASTFailedTests to QuickParseASTTests.  
	Moved testBug39536B() from ASTFailedTests to QuickParseASTTests.
2003-10-21 23:22:40 +00:00
John Camelon
e63b06fc5f Patch for Andrew Niefer
core:
  PST changes:
  - modify lookupConstructor to copy the constructor list before resolving 
on it
  - modify checkUserDefinedConversionSequence the same way
  - modify isValidFunctionOverload to check for forward declarations

core.tests:
- added testBug43951 to CompleteParseASTTest
2003-10-01 21:15:45 +00:00
John Camelon
9b33f17d3f CORE
Fixed Bug 43987 : Search results: Declaration of class not highlighted when selected 
	Fixed Bug 43997 : Search results: selection includes preceding whitespace 
	Fixed Bug 44034 : Scanner failure on #undef
2003-10-01 20:34:58 +00:00
John Camelon
0d05a8342d Patch for Bogdan Gheorghe.
This patch fixes the indexer merge problem on large projects. 

Automation Test Suite run on Windows + Linux.
2003-10-01 19:43:06 +00:00
John Camelon
c3b63fb508 Patch for Andrew Niefer
Bug 43450 - Path strings containing backslashes need quoting by hand
The user needs to input strings in whatever manner necessary for their 
build tools to work.  If that means quoting them, then quote them.

However, if the user does quote them, then the scanner needs to handle 
that when looking for include files:

core:
-modify Scanner.handleInclusion

core.tests:
- added testBug43450 to ManagedBuildTests.java
- added a user include to plugin.xml
2003-10-01 17:10:20 +00:00
John Camelon
46a9e7fd6f Patch for Bogdan Gheorghe.
Here's a patch that creates and manages a CDT log file in the .metadata\.plugins\org.eclipse.cdt.core folder. This log file, for now, will contain indexer failure messages and parser failure messages - particularly inclusion failures. These messages were being logged to the PDE error log which, given the number of failures that we can expect on some files, was filling up rather quickly. I put a 5MB limit on the CDT log file after which it gets deleted and a new one gets created. The intent of this log file is to help a user figure out why something isn't being indexed properly - the usual reasons are: i) can't find an include file, ii) symbols not defined. 

Also in this patch are 2 minor UI fixes: i) dedicated to Brent - Ctrl+H now brings up the C++ Search Dialog for all C Editor supported extensions, and ii) especially for Alain - F3 will perform a Open Declarations.
2003-10-01 13:33:39 +00:00
John Camelon
007714a394 CORE
Fixed Bug 43503 : Search:f_SD_01 cannot be found in ManyClasses20 Project 
	Fixed Bug 43680 : Fix Parser Error Handling 

TESTS
	Updated CompleteParseASTTest::testBug42872()
	Moved FailedCompleteParseASTTest::testBug43503() to CompleteParseASTTest::testBug43503A().
2003-09-30 20:42:24 +00:00
John Camelon
1a408fd237 Patch for Hoda Amer
Core: 
        -Solution to [Bug 43053] require reference cleanup for expressions 
        Added purgeReferences() at the end of ASTExpression::acceptElement()
2003-09-30 19:44:22 +00:00
John Camelon
e3e3ba0e9e Patch for Andrew Niefer
Core:
PST changes for bug 43503 - parser needs to know the different between 
ambiguous functions
        and no functions when no parameter information is provided
        - throw r_UnableToResolveFunction if we have more than 1 function 
and no parameter info was given
        - handle this case in addUsingDeclaration.
        * note that r_UnableToResolveFunction doesn't necessarily mean 
ambiguous if we had enough information

Core.Tests:
added testBug43503_AmbiguousUsing() and 
testBug43503_UnableToResolveFunction() to ParserSymbolTableTest
2003-09-30 18:03:20 +00:00
John Camelon
16c24c6cc9 Patch for Hoda Amer
Core: 
        Solution to bug#43679 : Exceptions in indexer 
Tests: 
        -Added testBug43679_A() & testBug43679_B() to CompleteParseASTTest 
        -Renamed FailedCompleteParseASTExpressionTest to FailedCompleteParseASTTest 
        -Added FailedCompleteParseASTTest::testBug43503()
2003-09-30 13:51:56 +00:00
John Camelon
746563ed2b Patch for Andrew Niefer
Core:
- fixed bug 43834 : Empty Parameter list and parameter list taking one 
void do not match
- fix NPE if IScannerInfoProvider returns null IScannerInfo

Tests:
- added testbug43834 to ParserSymbolTableTest
2003-09-29 19:49:19 +00:00
John Camelon
e95da4dade CORE
Continued work on Bug 43062 : Outline is confused on operator methods containing spaces 
	Partial fix for   Bug 43680 : Fix Parser Error Handling 

TEST
	Added testErrorHandling_1() to CompleteParseASTTest.java.
2003-09-29 19:22:09 +00:00
John Camelon
a3a827cf92 CORE
Fixed Bug 43644 : 6 triangle icons appearing in outline viewer when typing an error
	Fixed Bug 43062 : Outline is confused on operator methods containing spaces 
	Fixed Bug 39531 : Problems with type conversion operators 

TEST
	Added QuickParseASTTests::testBug43644() & testBug43062().  
	Moved ASTFailedTests::testBug39531() to QuickParseASTTests.
2003-09-26 19:21:12 +00:00
John Camelon
ba0a125734 Patch for Hoda Amer
Core: 
        - Last part of solution to bug#42453: Expression result types not computed 
        Added the handling of POSTFIX_TYPENAME_IDENTIFIER 
        Completed bug#43221: POSTFIX_TYPENAME_IDENTIFIER not implemented 
        - Solution to bug#43644 : 6 triangle icons appearing in outline viewer when typing ... 
Tests: 
        Enabled CompleteParseASTExpressionTest.testPostfixTypenameIdentifier() 
UI: 
        Solution to bug#43646: Code Assist won't work if missing end bracket
2003-09-25 19:40:39 +00:00
John Camelon
9cd42c12c5 Patch for Hoda Amer
Core: 
        Partial solution to bug#42453: Expression result types not computed 
        Added the handling of the NEW_TYPEID, CASTEXPRESSION, POSTFIX_DYNAMIC_CAST, 
        POSTFIX_REINTERPRET_CAST, POSTFIX_STATIC_CAST, and POSTFIX_CONST_CAST 

Tests: 
        Added testNewTypeId(), testCastExpression(), testPostfixDynamicCast(), 
        testPostfixReinterpretCast(), testPostfixStaticCast(), and testPostfixConstCast() 
        to CompleteParseASTExpressionTest.
2003-09-25 14:26:33 +00:00
John Camelon
a6efadb09a CORE
Partial fix for Bug 43221 : POSTFIX_TYPENAME_IDENTIFIER not implemented 

TEST
	Updated CompleteParseASTExpressionTest::testPostfixTypenameIdentifier() for Hoda.
2003-09-25 13:33:33 +00:00
John Camelon
a317cc46f9 CORE
Fixed Bug 43106 : Symbol Table support needed to resolve types
	Fixed Bug 43375 : isExtern not returning true for extern declarations 

TESTS
	Added testBug43375() to CompleteParseASTTest. 
	Moved testConditionalExpressionWithReferencesB_Bug43106 from failed tests to passed tests. 
	Moved testPMDotStar() and testPMArrowStar to failed tests w/defect number 43579.
2003-09-24 17:26:45 +00:00
John Camelon
02c194aaf4 CORE
Fixed Bug 43084 : need to restructure TypeId to allow dynamic_cast<> type expression references.
	Fixed Bug 39504 : sizeof-expressions are not handled properly

TESTS
	Replaced ASTFailedTests::testBug39504A() with CompleteParseASTTest::testBug39504(). 
	Moved testPostfixTypeIdExpression2() && testPostfixTypeIdTypeId2() to CompleteParseASTExpressionTest. 
	Restructured expression reference tests so that the order of arrival will not cause JUnit failures.
2003-09-23 22:58:34 +00:00
John Camelon
ef856ea3e1 Patch for Hoda Amer
Core: 
        Solution to bug#43373: No reference to static member in definition  (Major) 
        Solution to bug#43371: constructor incorrectly marked private (Normal) 
Tests: 
        Added CompleteParseASTTest.testBug43373() 
        Added QuickParseASTTests.testBug43371() 
UI: 
        Solution to bug#43143: Naming of Code Assist Menus/Tab are not consistent 
        changed both names to Content Assist. No tests provided.
2003-09-23 20:46:22 +00:00
John Camelon
3e361ae186 Core :
Solution to bug#43162 : Code Assist not showing the right return value: 
        Saved a function return value string in the BasicSearchMatch object. 
        Created a new package org.eclipse.cdt.internal.core.parser.util and 
        added ASTUtil class with static methods to help convert an ASTFunction 
        return type from IASTAbstractDeclaration to String. Note that this was 
        previously implemented in the CModelBuilder. I just moved it to a common 
        library for others (BasicSearchMatch) to use. 
UI: 
        Solutions to 
        bug#43162 : Code Assist not showing the right return value 
        Bug#43145 : foo function still showing in Code Assist even if "f" is deleted 
        Bug#42810 : Code Assist adding characters after pressing <enter> 
        Bug#42861 : Code Assist should be case insensitive. 

Tests: 
        Solution to bug#43162 : Code Assist not showing the right return value. 
        Solution to Bug#42861 : Code Assist should be case insensitive. 
        Modified the CompletionProposalsTest to include upper and lower cases 
        and to include functions with different return values.
2003-09-23 13:54:28 +00:00
John Camelon
8c79a22ec0 Patch for Andrew Niefer
Core :
        - modified Symbol table interfaces to use List & Map instead of 
LinkedList and HashMap
        - fixed warnings in ParserSymbolTable
        - fixed bug43106 - Symbol Table support needed to resolve types
        - fixed bug43156 - require ability to add implicit inheritance 
copy constructor
        - fixed bug43159 - TypeInfo.equals() not working properly
        - fixed bug43238 - Postfix_Subscript expressions confuse function 
resolution

Tests:
        - removed testConditionalExpression_Bug43159 from 
FailedCompleteParseASTExpressionTest
          and uncommented it (testConditionalExpression) in 
CompleteParseASTExpressionTest
        - uncommented the following tests in 
CompleteParseASTExpressionTest :
            testPostfixSubscript, 
            testPostfixSubscriptA, 
            testPostfixSubscriptB,
            testPostfixSubscriptWithReferences
        - updated ParserSymbolTableTests to use new addOperatorExpression 
function
        - added testDerivedReference, testAddCopyConstructor to 
ParserSymbolTableTests
        - fixed warning in ClassDeclarationPatternTests
2003-09-19 16:00:53 +00:00
John Camelon
43d8ca642d Patch for Hoda Amer
Core: 
         In completeParseASTFactory.getExpressionResultType(): Added  the support 
         for expression types: PM_DOTSTAR, PM_ARROWSTAR, CONDITIONALEXPRESSION
 Tests: 
         Added more success test cases to CompleteParseASTExpressionTest 
         and more failure test cases to FailedCompleteParseASTExpressionTest 
         in testing PM_DOTSTAR, PM_ARROWSTAR, CONDITIONALEXPRESSION
2003-09-18 15:22:48 +00:00
John Camelon
51a73af86d Patch for Andrew Niefer
core :
        - add parameter references to index
        - modify CharOperation.match to allow escaping wildcards 
(bug43063)
        - modify AbstractIndexer.bestPrefix to handle wildcard escaping in 
name (bug43063)
        - modify CSearchPattern to handle escaping wildcards (bug43063)
        - modify enterFunctionBody and enterMethodBody to fix bug42979
        - search for Parameter References
        - added setThrowExceptionOnBadCharacterRead to IScanner to help 
with wildcard bug43063

tests:
        - modified resources/search/classDecl.cpp & include.h to include 
some operators
        - added testOperators_bug43063_bug42979() to 
MethodDeclarationPatternTests
        - added testParameterREferences to OtherPatternTests
2003-09-18 15:15:09 +00:00
John Camelon
9b9bf1a17c IASTFunction::previouslyDeclared implementation 2003-09-16 15:34:43 +00:00
John Camelon
6f580b7c1a Patch for Hoda Amer
Core: 
        In completeParseASTFactory.getExpressionResultType(): Added the support 
        for expression type PRIMARY_THIS. 
        In createMethod(): changed the scope of a method definition to point to 
        the parent class. 

Tests: 
    Added CompleteParseASTExpressionTest.testPrimaryThis()
2003-09-16 14:45:39 +00:00
John Camelon
61976f1b51 CORE
Fixed Bug 39556 : 'restrict' qualifier is not supported (ANSI C99) 
	Fixed Bug 43126 : ISourceElementRequestor.acceptParameterReference accesses internal class
	Fixed Bug 43062 : Outline is confused on operator methods containing spaces 
	Cleaned up some warnings in the parser. 

TESTS
	Moved ASTFailedTests::testBug39556() to QuickParseASTTests.
	Cleaned up some warnings in parser tests.
2003-09-15 22:50:59 +00:00
John Camelon
994113f274 Patch for Niefer Andrew
Core: 
bug43106 - added getConditionalOperand to ParserSymbolTable

Core.tests:
added testGetConditionalOperand_bug43106 to ParserSymbolTableTests
2003-09-15 21:50:00 +00:00
John Camelon
780a8096ed CORE
Partially fixed Bug 42979 : Cannot search for operator overloaders 
	

TESTS
	Added CompleteParseASTTest::testBug42979().
	Updated CompleteParseASTTest::testAndrewsExample().
2003-09-15 19:04:48 +00:00
John Camelon
bc7648a24e Patch for Hoda Amer.
Core: 
        In completeParseASTFactory.getExpressionResultType() 
        - Added the handling of some more expression types. 
        See CompleteParseASTExpressionTest for details. 
Tests: 
    - Added lots of test cases to CompleteParseASTExpressionTest
2003-09-15 13:20:30 +00:00
John Camelon
edd344b8af CORE
Fixed Bug 42985 : Search: Qualified function call is treated as a declaration 
	Fixed Bug 40419 : parser fails on heavily templated expressions 

TESTS
	Created QuickParseASTTests::testBug42985(). 
	Moved LokiFailures::testBug40419() to QuickParseASTTests. 
	Deleted LokiFailures as it was empty.
2003-09-12 19:11:22 +00:00
John Camelon
9d95cfa455 CORE
Fixed Bug 43013 : IASTParameterDeclaration does not derive from IASTOffsetableNamedElement
2003-09-12 18:36:36 +00:00
John Camelon
406f05d071 Patch for Andrew Niefer
This is my previous patch updated with a test and resubmitted.

It fixes some NPE's in function resolution if the parameter information is 
bad. 
It also tries to clarify conversion sequence ranking with comments and 
constants.
2003-09-12 15:08:40 +00:00
John Camelon
322dcaad49 CORE
Fixed Bug 42840 : Search: Cannot find things after double declarations 
	Fixed Bug 42798 : Selected #include <Angled> off by 1 char 
	Fixed Bug 42872 : dynamic cast not parsed properly 
	Partially fixed Bug 39504 : sizeof-expressions are not handled properly 
	Updated SourceElementRequestor callbacks to include IASTParameterReference callbacks. 

UI 
	Updated SourceElementRequestor callbacks to include IASTParameterReference callbacks. 

TESTS
	Added CompleteParseASTTest::testBug42840() & testBug42872().
	Moved testBug39504B(), testBug39505A() & testBug39505B() from failed to QuickParse tests.
2003-09-11 18:06:15 +00:00
John Camelon
d4cfca7836 Patch for Hoda Amer
Core: 
        - Solved the double reference problem 
        - solution to bugs #42822, #42823, & #42822B 

Tests: 

        Moved three failed tests (bugs #42822, #42823, & #42822B) 
        from FailedCompleteParseASTExpressionTest to CompleteParseASTExpressionTest
2003-09-10 13:21:53 +00:00
John Camelon
7ff5917dad Patch for Hoda Amer
CORE
	-Added more IASTExpression.Kind handling to CompleteParseASTFactory.getExpressionResultType()	
TESTS
	-Seperated the Expression result type test in a new file : completeParseASTExpressionTests.
	-Added more test cases for simple types.
	-Added FailedCompleteParseASTExpressionTest for failed reference tests.
2003-09-09 20:01:23 +00:00
John Camelon
93b627eabc CORE
Updated ScannerException to be more precise and include more information.  
	Updated Parser to be more careful of how it handles particular Scanner errors in COMPLETE_PARSE mode.  
	
TESTS
	Updated ScannerTestCase to keep up to date wrt ScannerException updates.
2003-09-09 18:02:40 +00:00