clang API Documentation

Classes | Enumerations
clang::SrcMgr Namespace Reference

Classes

class  ContentCache
class  FileInfo
class  ExpansionInfo
class  SLocEntry

Enumerations

enum  CharacteristicKind { C_User, C_System, C_ExternCSystem }

Detailed Description

There are three different types of locations in a file: a spelling location, an expansion location, and a presumed location.

Given an example of: #define min(x, y) x < y ? x : y

and then later on a use of min: #line 17 return min(a, b);

The expansion location is the line in the source code where the macro was expanded (the return statement), the spelling location is the location in the source where the macro was originally defined, and the presumed location is where the line directive states that the line is 17, or any other line. SrcMgr - Public enums and private classes that are part of the SourceManager implementation.


Enumeration Type Documentation

CharacteristicKind - This is used to represent whether a file or directory holds normal user code, system code, or system code which is implicitly 'extern "C"' in C++ mode. Entire directories can be tagged with this (this is maintained by DirectoryLookup and friends) as can specific FileInfos when a #pragma system_header is seen or various other cases.

Enumerator:
C_User 
C_System 
C_ExternCSystem 

Definition at line 67 of file SourceManager.h.