Commit cfffb40
committed
AST: Perform a top-level lookup in directReferencesForUnqualifiedTypeLookup() if necessary
UnqualifiedLookupRequest takes a DeclContext and a SourceLoc. If the
SourceLoc is valid, it locates the innermost ASTScope containing this
location, and starts the lookup from that scope.
Also, ASTScope currently walks up the scope tree to find the
innermost scope that corresponds to the given DeclContext, in case
the DeclContext is a parent of the 'natural' DeclContext for this
source location.
We want to remove this additional behavior and make ASTScope only
depend on a source file and source location.
This requires changing directReferencesForUnqualifiedTypeLookup()
to handle the top-level lookup case explicitly. See the comment for
more details.1 parent df1b631 commit cfffb40
1 file changed
+28
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1946 | 1946 | | |
1947 | 1947 | | |
1948 | 1948 | | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
1949 | 1974 | | |
| 1975 | + | |
1950 | 1976 | | |
1951 | 1977 | | |
1952 | 1978 | | |
| |||
1958 | 1984 | | |
1959 | 1985 | | |
1960 | 1986 | | |
1961 | | - | |
1962 | | - | |
| 1987 | + | |
| 1988 | + | |
1963 | 1989 | | |
1964 | 1990 | | |
1965 | 1991 | | |
| |||
0 commit comments