blob: a3d2185abde1d9c141b9287f1c57e07bee389084 [file] [log] [blame]
Chris Lattnerddd6fc82006-11-10 04:58:55 +00001//===--- Sema.cpp - AST Builder and Semantic Analysis Implementation ------===//
Chris Lattner3e7bd4e2006-08-17 05:51:27 +00002//
3// The LLVM Compiler Infrastructure
4//
5// This file was developed by Chris Lattner and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
Chris Lattnerddd6fc82006-11-10 04:58:55 +000010// This file implements the actions class which performs semantic analysis and
11// builds an AST out of a parse stream.
Chris Lattner3e7bd4e2006-08-17 05:51:27 +000012//
13//===----------------------------------------------------------------------===//
14
Chris Lattnerddd6fc82006-11-10 04:58:55 +000015#include "Sema.h"
Chris Lattnercb6a3822006-11-10 06:20:45 +000016#include "clang/AST/ASTContext.h"
Chris Lattnerd3e98952006-10-06 05:22:26 +000017#include "clang/Lex/Preprocessor.h"
Chris Lattnerc11438c2006-08-18 05:17:52 +000018using namespace llvm;
19using namespace clang;
20
Chris Lattnercb6a3822006-11-10 06:20:45 +000021
Chris Lattnerc11438c2006-08-18 05:17:52 +000022//===----------------------------------------------------------------------===//
Chris Lattnereaafe1222006-11-10 05:17:58 +000023// Helper functions.
24//===----------------------------------------------------------------------===//
25
26void Sema::Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg) {
Chris Lattnercb6a3822006-11-10 06:20:45 +000027 Context.PP.Diag(Loc, DiagID, Msg);
Chris Lattnereaafe1222006-11-10 05:17:58 +000028}
29
30